BitmapPoolFactory.java 文件源码

java
阅读 46 收藏 0 点赞 0 评论 0

项目:homunculus 作者:
@Override
public int countBitmaps(int width, int height, Config config) {
    int c = 0;
    synchronized (mCache) {
        Iterator<Bitmap> it = mCache.iterator();
        while (it.hasNext()) {
            Bitmap bmp = it.next();
            if (bmp.isRecycled()) {
                it.remove();
                continue;
            }
            if (bmp.getWidth() == width && bmp.getHeight() == height && bmp.getConfig() == config) {
                c++;
            }
        }
    }
    return c;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号