public static BitmapResource obtain(Bitmap bitmap, BitmapPool bitmapPool) {
        if (bitmap == null) {
            return null;
        } else {
            return new BitmapResource(bitmap, bitmapPool);
        }
    }
Returns a new {@link BitmapResource} wrapping the given {@link Bitmap} if the Bitmap is non-null or null if the
given Bitmap is null.

@param bitmap A Bitmap.
@param bitmapPool A non-null {@link BitmapPool}.
core/src/main/java/com/bumptech/glide/load/resource/bitmap/BitmapResource.java