public DecodeProducer( final ByteArrayPool byteArrayPool, final Executor executor, final ImageDecoder imageDecoder, final ProgressiveJpegConfig progressiveJpegConfig, final boolean downsampleEnabled, final boolean downsampleEnabledForNetwork, final boolean decodeCancellationEnabled, final Producer<EncodedImage> inputProducer, final Supplier<Boolean> experimentalSmartResizingEnabled) { mByteArrayPool = Preconditions.checkNotNull(byteArrayPool); mExecutor = Preconditions.checkNotNull(executor); mImageDecoder = Preconditions.checkNotNull(imageDecoder); mProgressiveJpegConfig = Preconditions.checkNotNull(progressiveJpegConfig); mDownsampleEnabled = downsampleEnabled; mDownsampleEnabledForNetwork = downsampleEnabledForNetwork; mInputProducer = Preconditions.checkNotNull(inputProducer); mDecodeCancellationEnabled = decodeCancellationEnabled; mExperimentalSmartResizingEnabled = experimentalSmartResizingEnabled; }
ProducerFactory createProducerFactory( Context context, ByteArrayPool byteArrayPool, ImageDecoder imageDecoder, ProgressiveJpegConfig progressiveJpegConfig, boolean downsampleEnabled, boolean resizeAndRotateEnabledForNetwork, boolean decodeCancellationEnabled, Supplier<Boolean> experimentalSmartResizingEnabled, ExecutorSupplier executorSupplier, PooledByteBufferFactory pooledByteBufferFactory, MemoryCache<CacheKey, CloseableImage> bitmapMemoryCache, MemoryCache<CacheKey, PooledByteBuffer> encodedMemoryCache, BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, MediaVariationsIndex mediaVariationsIndex, CacheKeyFactory cacheKeyFactory, PlatformBitmapFactory platformBitmapFactory, int bitmapPrepareToDrawMinSizeBytes, int bitmapPrepareToDrawMaxSizeBytes, boolean bitmapPrepareToDrawForPrefetch);
public NetworkImagesProgressiveDecoder( final Consumer<CloseableReference<CloseableImage>> consumer, final ProducerContext producerContext, final ProgressiveJpegParser progressiveJpegParser, final ProgressiveJpegConfig progressiveJpegConfig, final boolean decodeCancellationEnabled) { super(consumer, producerContext, decodeCancellationEnabled); mProgressiveJpegParser = Preconditions.checkNotNull(progressiveJpegParser); mProgressiveJpegConfig = Preconditions.checkNotNull(progressiveJpegConfig); mLastScheduledScanNumber = 0; }
@Override public ProducerFactory createProducerFactory( Context context, ByteArrayPool byteArrayPool, ImageDecoder imageDecoder, ProgressiveJpegConfig progressiveJpegConfig, boolean downsampleEnabled, boolean resizeAndRotateEnabledForNetwork, boolean decodeCancellationEnabled, Supplier<Boolean> experimentalSmartResizingEnabled, ExecutorSupplier executorSupplier, PooledByteBufferFactory pooledByteBufferFactory, MemoryCache<CacheKey, CloseableImage> bitmapMemoryCache, MemoryCache<CacheKey, PooledByteBuffer> encodedMemoryCache, BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, MediaVariationsIndex mediaVariationsIndex, CacheKeyFactory cacheKeyFactory, PlatformBitmapFactory platformBitmapFactory, int bitmapPrepareToDrawMinSizeBytes, int bitmapPrepareToDrawMaxSizeBytes, boolean bitmapPrepareToDrawForPrefetch) { return new ProducerFactory( context, byteArrayPool, imageDecoder, progressiveJpegConfig, downsampleEnabled, resizeAndRotateEnabledForNetwork, decodeCancellationEnabled, experimentalSmartResizingEnabled, executorSupplier, pooledByteBufferFactory, bitmapMemoryCache, encodedMemoryCache, defaultBufferedDiskCache, smallImageBufferedDiskCache, mediaVariationsIndex, cacheKeyFactory, platformBitmapFactory, bitmapPrepareToDrawMinSizeBytes, bitmapPrepareToDrawMaxSizeBytes, bitmapPrepareToDrawForPrefetch); }
public ProgressiveJpegConfig getProgressiveJpegConfig() { return mProgressiveJpegConfig; }
public Builder setProgressiveJpegConfig(ProgressiveJpegConfig progressiveJpegConfig) { mProgressiveJpegConfig = progressiveJpegConfig; return this; }
public ProducerFactory( Context context, ByteArrayPool byteArrayPool, ImageDecoder imageDecoder, ProgressiveJpegConfig progressiveJpegConfig, boolean downsampleEnabled, boolean resizeAndRotateEnabledForNetwork, boolean decodeCancellationEnabled, Supplier<Boolean> experimentalSmartResizingEnabled, ExecutorSupplier executorSupplier, PooledByteBufferFactory pooledByteBufferFactory, MemoryCache<CacheKey, CloseableImage> bitmapMemoryCache, MemoryCache<CacheKey, PooledByteBuffer> encodedMemoryCache, BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, MediaVariationsIndex mediaVariationsIndex, CacheKeyFactory cacheKeyFactory, PlatformBitmapFactory platformBitmapFactory, int bitmapPrepareToDrawMinSizeBytes, int bitmapPrepareToDrawMaxSizeBytes, boolean bitmapPrepareToDrawForPrefetch) { mContentResolver = context.getApplicationContext().getContentResolver(); mResources = context.getApplicationContext().getResources(); mAssetManager = context.getApplicationContext().getAssets(); mByteArrayPool = byteArrayPool; mImageDecoder = imageDecoder; mProgressiveJpegConfig = progressiveJpegConfig; mDownsampleEnabled = downsampleEnabled; mResizeAndRotateEnabledForNetwork = resizeAndRotateEnabledForNetwork; mDecodeCancellationEnabled = decodeCancellationEnabled; mExperimentalSmartResizingEnabled = experimentalSmartResizingEnabled; mExecutorSupplier = executorSupplier; mPooledByteBufferFactory = pooledByteBufferFactory; mBitmapMemoryCache = bitmapMemoryCache; mEncodedMemoryCache = encodedMemoryCache; mDefaultBufferedDiskCache = defaultBufferedDiskCache; mSmallImageBufferedDiskCache = smallImageBufferedDiskCache; mMediaVariationsIndex = mediaVariationsIndex; mCacheKeyFactory = cacheKeyFactory; mPlatformBitmapFactory = platformBitmapFactory; mBitmapPrepareToDrawMinSizeBytes = bitmapPrepareToDrawMinSizeBytes; mBitmapPrepareToDrawMaxSizeBytes = bitmapPrepareToDrawMaxSizeBytes; mBitmapPrepareToDrawForPrefetch = bitmapPrepareToDrawForPrefetch; }