Lines Matching refs:holder
527 for (BitmapHolder holder : mBitmapHolderCache.snapshot().values()) { in refreshCache()
528 holder.fresh = false; in refreshCache()
538 BitmapHolder holder = mBitmapHolderCache.get(request.getKey()); in loadCachedPhoto() local
539 if (holder == null) { in loadCachedPhoto()
545 if (holder.bytes == null) { in loadCachedPhoto()
547 return holder.fresh; in loadCachedPhoto()
550 Bitmap cachedBitmap = holder.bitmapRef == null ? null : holder.bitmapRef.get(); in loadCachedPhoto()
552 if (holder.bytes.length < 8 * 1024) { in loadCachedPhoto()
554 inflateBitmap(holder, request.getRequestedExtent()); in loadCachedPhoto()
555 cachedBitmap = holder.bitmap; in loadCachedPhoto()
592 holder.bitmap = null; in loadCachedPhoto()
594 return holder.fresh; in loadCachedPhoto()
602 private static void inflateBitmap(BitmapHolder holder, int requestedExtent) { in inflateBitmap() argument
604 BitmapUtil.findOptimalSampleSize(holder.originalSmallerExtent, requestedExtent); in inflateBitmap()
605 byte[] bytes = holder.bytes; in inflateBitmap()
610 if (sampleSize == holder.decodedSampleSize) { in inflateBitmap()
613 if (holder.bitmapRef != null) { in inflateBitmap()
614 holder.bitmap = holder.bitmapRef.get(); in inflateBitmap()
615 if (holder.bitmap != null) { in inflateBitmap()
640 holder.decodedSampleSize = sampleSize; in inflateBitmap()
641 holder.bitmap = bitmap; in inflateBitmap()
642 holder.bitmapRef = new SoftReference<Bitmap>(bitmap); in inflateBitmap()
747 for (BitmapHolder holder : mBitmapHolderCache.snapshot().values()) { in softenCache()
748 holder.bitmap = null; in softenCache()
769 BitmapHolder holder = new BitmapHolder(bytes, in cacheBitmap() local
775 inflateBitmap(holder, requestedExtent); in cacheBitmap()
778 mBitmapHolderCache.put(key, holder); in cacheBitmap()
788 BitmapHolder holder = new BitmapHolder(photoBytes, smallerExtent); in cacheBitmap() local
789 holder.bitmapRef = new SoftReference<Bitmap>(bitmap); in cacheBitmap()
790 mBitmapHolderCache.put(request.getKey(), holder); in cacheBitmap() local
818 final BitmapHolder holder = mBitmapHolderCache.get(request.getKey()); in obtainPhotoIdsAndUrisToLoad() local
819 if (holder != null && holder.bytes != null && holder.fresh && in obtainPhotoIdsAndUrisToLoad()
820 (holder.bitmapRef == null || holder.bitmapRef.get() == null)) { in obtainPhotoIdsAndUrisToLoad()
822 inflateBitmap(holder, request.getRequestedExtent()); in obtainPhotoIdsAndUrisToLoad()
825 if (holder == null || !holder.fresh) { in obtainPhotoIdsAndUrisToLoad()