Home | History | Annotate | Download | only in util

Lines Matching defs:bitmap

21 import android.graphics.Bitmap;
22 import android.graphics.Bitmap.CompressFormat;
23 import android.graphics.Bitmap.Config;
83 private Set<SoftReference<Bitmap>> mReusableBitmaps;
143 // balancing of memory usage between this set and the bitmap LruCache. It would also
149 Collections.synchronizedSet(new HashSet<SoftReference<Bitmap>>());
168 // We're running on Honeycomb or later, so add the bitmap
170 mReusableBitmaps.add(new SoftReference<Bitmap>(oldValue.getBitmap()));
177 * for a bitmap cache
231 * Adds a bitmap to both memory and disk cache.
232 * @param data Unique identifier for the bitmap to store
233 * @param value The bitmap drawable to store
290 * @return The bitmap drawable if found in cache, null otherwise
312 * @return The bitmap if found in cache, null otherwise
314 public Bitmap getBitmapFromDiskCache(String data) {
317 Bitmap bitmap = null;
337 // Decode bitmap, but we don't want to sample so give
339 bitmap = ImageResizer.decodeSampledBitmapFromDescriptor(
353 return bitmap;
360 * @return Bitmap that case be used for inBitmap
362 protected Bitmap getBitmapFromReusableSet(BitmapFactory.Options options) {
364 Bitmap bitmap = null;
368 final Iterator<SoftReference<Bitmap>> iterator = mReusableBitmaps.iterator();
369 Bitmap item;
377 bitmap = item;
391 return bitmap;
514 * @param candidate - Bitmap to check
521 Bitmap candidate, BitmapFactory.Options targetOptions) {
530 // From Android 4.4 (KitKat) onward we can re-use if the byte size of the new bitmap
531 // is smaller than the reusable bitmap candidate allocation byte count.
540 * Return the byte usage per pixel of a bitmap based on its configuration.
541 * @param config The bitmap configuration.
605 * Get the size in bytes of a bitmap in a BitmapDrawable. Note that from Android 4.4 (KitKat)
606 * onward this returns the allocated memory size of the bitmap which can be larger than the
607 * actual bitmap data byte count (in the case it was re-used).
614 Bitmap bitmap = value.getBitmap();
617 // larger than bitmap byte count.
619 return bitmap.getAllocationByteCount();
623 return bitmap.getByteCount();
627 return bitmap.getRowBytes() * bitmap.getHeight();