Java 类com.bumptech.glide.load.resource.NullCacheDecoder 实例源码

项目:saarang-iosched    文件:GifFrameManager.java   
public GifFrameManager(Context context, GifDecoder decoder, Handler mainHandler,
        Transformation<Bitmap> transformation) {
    this.context = context;
    this.decoder = decoder;
    this.mainHandler = mainHandler;
    this.transformation = transformation;
    calculator = new MemorySizeCalculator(context);
    frameLoader = new GifFrameModelLoader();
    frameResourceDecoder = new GifFrameResourceDecoder();

    if (!decoder.isTransparent()) {
        // For non transparent gifs, we can beat the performance of our gif decoder for each frame by decoding jpegs
        // from disk.
        cacheDecoder = new StreamBitmapDecoder(context);
        encoder = new BitmapEncoder(Bitmap.CompressFormat.JPEG, 70);
    } else {
        // For transparent gifs, we would have to encode as pngs which is actually slower than our gif decoder so we
        // avoid writing frames to the disk cache entirely.
        cacheDecoder = NullCacheDecoder.get();
        encoder = SkipCache.get();
    }
}
项目:AppDevFestSudeste2015    文件:GifFrameManager.java   
public GifFrameManager(Context context, GifDecoder decoder, Handler mainHandler,
        Transformation<Bitmap> transformation) {
    this.context = context;
    this.decoder = decoder;
    this.mainHandler = mainHandler;
    this.transformation = transformation;
    calculator = new MemorySizeCalculator(context);
    frameLoader = new GifFrameModelLoader();
    frameResourceDecoder = new GifFrameResourceDecoder();

    if (!decoder.isTransparent()) {
        // For non transparent gifs, we can beat the performance of our gif decoder for each frame by decoding jpegs
        // from disk.
        cacheDecoder = new StreamBitmapDecoder(context);
        encoder = new BitmapEncoder(Bitmap.CompressFormat.JPEG, 70);
    } else {
        // For transparent gifs, we would have to encode as pngs which is actually slower than our gif decoder so we
        // avoid writing frames to the disk cache entirely.
        cacheDecoder = NullCacheDecoder.get();
        encoder = SkipCache.get();
    }
}
项目:devfestnorte-app    文件:GifFrameManager.java   
public GifFrameManager(Context context, GifDecoder decoder, Handler mainHandler,
        Transformation<Bitmap> transformation) {
    this.context = context;
    this.decoder = decoder;
    this.mainHandler = mainHandler;
    this.transformation = transformation;
    calculator = new MemorySizeCalculator(context);
    frameLoader = new GifFrameModelLoader();
    frameResourceDecoder = new GifFrameResourceDecoder();

    if (!decoder.isTransparent()) {
        // For non transparent gifs, we can beat the performance of our gif decoder for each frame by decoding jpegs
        // from disk.
        cacheDecoder = new StreamBitmapDecoder(context);
        encoder = new BitmapEncoder(Bitmap.CompressFormat.JPEG, 70);
    } else {
        // For transparent gifs, we would have to encode as pngs which is actually slower than our gif decoder so we
        // avoid writing frames to the disk cache entirely.
        cacheDecoder = NullCacheDecoder.get();
        encoder = SkipCache.get();
    }
}
项目:saarang-iosched    文件:GifFrameManager.java   
public GifFrameManager(Context context, GifDecoder decoder, Handler mainHandler,
        Transformation<Bitmap> transformation) {
    this.context = context;
    this.decoder = decoder;
    this.mainHandler = mainHandler;
    this.transformation = transformation;
    calculator = new MemorySizeCalculator(context);
    frameLoader = new GifFrameModelLoader();
    frameResourceDecoder = new GifFrameResourceDecoder();

    if (!decoder.isTransparent()) {
        // For non transparent gifs, we can beat the performance of our gif decoder for each frame by decoding jpegs
        // from disk.
        cacheDecoder = new StreamBitmapDecoder(context);
        encoder = new BitmapEncoder(Bitmap.CompressFormat.JPEG, 70);
    } else {
        // For transparent gifs, we would have to encode as pngs which is actually slower than our gif decoder so we
        // avoid writing frames to the disk cache entirely.
        cacheDecoder = NullCacheDecoder.get();
        encoder = SkipCache.get();
    }
}