Home | History | Annotate | Download | only in bitmap

Lines Matching defs:bitmap

1 package com.bumptech.glide.load.resource.bitmap;
3 import android.graphics.Bitmap;
10 * A resource wrapping a {@link android.graphics.Bitmap} object.
12 public class BitmapResource implements Resource<Bitmap> {
13 private final Bitmap bitmap;
17 * Returns a new {@link BitmapResource} wrapping the given {@link Bitmap} if the Bitmap is non-null or null if the
18 * given Bitmap is null.
20 * @param bitmap A Bitmap.
23 public static BitmapResource obtain(Bitmap bitmap, BitmapPool bitmapPool) {
24 if (bitmap == null) {
27 return new BitmapResource(bitmap, bitmapPool);
31 public BitmapResource(Bitmap bitmap, BitmapPool bitmapPool) {
32 if (bitmap == null) {
33 throw new NullPointerException("Bitmap must not be null");
38 this.bitmap = bitmap;
43 public Bitmap get() {
44 return bitmap;
49 return Util.getBitmapByteSize(bitmap);
54 if (!bitmapPool.put(bitmap)) {
55 bitmap.recycle();