Search in sources :

Example 1 with ArrayPool

use of com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool in project glide by bumptech.

the class ThumbFetcher method build.

private static ThumbFetcher build(Context context, Uri uri, ThumbnailQuery query) {
    ArrayPool byteArrayPool = Glide.get(context).getArrayPool();
    ThumbnailStreamOpener opener = new ThumbnailStreamOpener(Glide.get(context).getRegistry().getImageHeaderParsers(), query, byteArrayPool, context.getContentResolver());
    return new ThumbFetcher(uri, opener);
}
Also used : ArrayPool(com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool)

Example 2 with ArrayPool

use of com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool in project Rocket by mozilla-tw.

the class ThumbFetcher method build.

private static ThumbFetcher build(Context context, Uri uri, ThumbnailQuery query) {
    ArrayPool byteArrayPool = Glide.get(context).getArrayPool();
    ThumbnailStreamOpener opener = new ThumbnailStreamOpener(Glide.get(context).getRegistry().getImageHeaderParsers(), query, byteArrayPool, context.getContentResolver());
    return new ThumbFetcher(uri, opener);
}
Also used : ArrayPool(com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool)

Example 3 with ArrayPool

use of com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool in project glide by bumptech.

the class DownsamplerEmulatorTest method buildDownsampler.

private static Downsampler buildDownsampler() {
    List<ImageHeaderParser> parsers = Collections.<ImageHeaderParser>singletonList(new DefaultImageHeaderParser());
    DisplayMetrics displayMetrics = new DisplayMetrics();
    // XHDPI.
    displayMetrics.densityDpi = 320;
    BitmapPool bitmapPool = new BitmapPoolAdapter();
    ArrayPool arrayPool = new LruArrayPool();
    return new Downsampler(parsers, displayMetrics, bitmapPool, arrayPool);
}
Also used : LruArrayPool(com.bumptech.glide.load.engine.bitmap_recycle.LruArrayPool) ArrayPool(com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool) LruArrayPool(com.bumptech.glide.load.engine.bitmap_recycle.LruArrayPool) BitmapPoolAdapter(com.bumptech.glide.load.engine.bitmap_recycle.BitmapPoolAdapter) ImageHeaderParser(com.bumptech.glide.load.ImageHeaderParser) DisplayMetrics(android.util.DisplayMetrics) BitmapPool(com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool)

Aggregations

ArrayPool (com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool)3 DisplayMetrics (android.util.DisplayMetrics)1 ImageHeaderParser (com.bumptech.glide.load.ImageHeaderParser)1 BitmapPool (com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool)1 BitmapPoolAdapter (com.bumptech.glide.load.engine.bitmap_recycle.BitmapPoolAdapter)1 LruArrayPool (com.bumptech.glide.load.engine.bitmap_recycle.LruArrayPool)1