public static class

ImagePipelineExperiments.Builder

extends Object
java.lang.Object
   ↳ com.facebook.imagepipeline.core.ImagePipelineExperiments.Builder

Summary

Fields
public int mBitmapCloseableRefType
public boolean mBitmapPrepareToDrawForPrefetch
public boolean mDownsampleIfLargeBitmap
public boolean mDownscaleFrameToDrawableDimensions
public boolean mEncodedCacheEnabled
public boolean mEnsureTranscoderLibraryLoaded
public boolean mExperimentalThreadHandoffQueueEnabled
public boolean mGingerbreadDecoderEnabled
public Supplier<Boolean> mLazyDataSource
public long mMemoryType
public Supplier<Boolean> mSuppressBitmapPrefetchingSupplier
Public Constructors
Builder(ImagePipelineConfig.Builder configBuilder)
Public Methods
ImagePipelineExperiments build()
boolean isPartialImageCachingEnabled()
ImagePipelineConfig.Builder setAllowDelay(boolean allowDelay)
ImagePipelineConfig.Builder setBitmapCloseableRefType(int bitmapCloseableRefType)
ImagePipelineConfig.Builder setBitmapPrepareToDraw(boolean useBitmapPrepareToDraw, int minBitmapSizeBytes, int maxBitmapSizeBytes, boolean preparePrefetch)
If enabled, the pipeline will call prepareToDraw() after decoding.
ImagePipelineConfig.Builder setDecodeCancellationEnabled(boolean decodeCancellationEnabled)
If true we cancel decoding jobs when the related request has been cancelled
ImagePipelineConfig.Builder setDownsampleIfLargeBitmap(boolean downsampleIfLargeBitmap)
ImagePipelineConfig.Builder setEncodedCacheEnabled(boolean encodedCacheEnabled)
ImagePipelineConfig.Builder setEnsureTranscoderLibraryLoaded(boolean ensureTranscoderLibraryLoaded)
ImagePipelineConfig.Builder setExperimentalMemoryType(long MemoryType)
ImagePipelineConfig.Builder setExperimentalThreadHandoffQueueEnabled(boolean experimentalThreadHandoffQueueEnabled)
ImagePipelineConfig.Builder setGingerbreadDecoderEnabled(boolean gingerbreadDecoderEnabled)
ImagePipelineConfig.Builder setIsDiskCacheProbingEnabled(boolean isDiskCacheProbingEnabled)
ImagePipelineConfig.Builder setIsEncodedMemoryCacheProbingEnabled(boolean isEncodedMemoryCacheProbingEnabled)
ImagePipelineConfig.Builder setKeepCancelledFetchAsLowPriority(boolean keepCancelledFetchAsLowPriority)
ImagePipelineConfig.Builder setLazyDataSource(Supplier<Boolean> lazyDataSource)
Stores an alternative lazy method to instantiate the data souce.
ImagePipelineConfig.Builder setMaxBitmapSize(int maxBitmapSize)
Sets the maximum bitmap size use to compute the downsampling value when decoding Jpeg images.
ImagePipelineConfig.Builder setNativeCodeDisabled(boolean nativeCodeDisabled)
If true, the pipeline will use alternative implementations without native code.
ImagePipelineConfig.Builder setPartialImageCachingEnabled(boolean partialImageCachingEnabled)
Enables the caching of partial image data, for example if the request is cancelled or fails after some data has been received.
ImagePipelineConfig.Builder setProducerFactoryMethod(ImagePipelineExperiments.ProducerFactoryMethod producerFactoryMethod)
Stores an alternative method to instantiate the ProducerFactory.
ImagePipelineConfig.Builder setShouldDownscaleFrameToDrawableDimensions(boolean downscaleFrameToDrawableDimensions)
ImagePipelineConfig.Builder setSuppressBitmapPrefetchingSupplier(Supplier<Boolean> suppressBitmapPrefetchingSupplier)
ImagePipelineConfig.Builder setTrackedKeysSize(int trackedKeysSize)
ImagePipelineConfig.Builder setUseCombinedNetworkAndCacheProducer(boolean useCombinedNetworkAndCacheProducer)
ImagePipelineConfig.Builder setUseDownsampligRatioForResizing(boolean useDownsamplingRatioForResizing)
ImagePipelineConfig.Builder setWebpBitmapFactory(WebpBitmapFactory webpBitmapFactory)
ImagePipelineConfig.Builder setWebpErrorLogger(WebpBitmapFactory.WebpErrorLogger webpErrorLogger)
ImagePipelineConfig.Builder setWebpSupportEnabled(boolean webpSupportEnabled)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public int mBitmapCloseableRefType

public boolean mBitmapPrepareToDrawForPrefetch

public boolean mDownsampleIfLargeBitmap

public boolean mDownscaleFrameToDrawableDimensions

public boolean mEncodedCacheEnabled

public boolean mEnsureTranscoderLibraryLoaded

public boolean mExperimentalThreadHandoffQueueEnabled

public boolean mGingerbreadDecoderEnabled

public Supplier<Boolean> mLazyDataSource

public long mMemoryType

public Supplier<Boolean> mSuppressBitmapPrefetchingSupplier

Public Constructors

public Builder (ImagePipelineConfig.Builder configBuilder)

Public Methods

public ImagePipelineExperiments build ()

public boolean isPartialImageCachingEnabled ()

public ImagePipelineConfig.Builder setAllowDelay (boolean allowDelay)

public ImagePipelineConfig.Builder setBitmapCloseableRefType (int bitmapCloseableRefType)

public ImagePipelineConfig.Builder setBitmapPrepareToDraw (boolean useBitmapPrepareToDraw, int minBitmapSizeBytes, int maxBitmapSizeBytes, boolean preparePrefetch)

If enabled, the pipeline will call prepareToDraw() after decoding. This potentially reduces lag on Android N+ as this step now happens async when the RendererThread is idle.

Parameters
useBitmapPrepareToDraw set true for enabling prepareToDraw
minBitmapSizeBytes Bitmaps with a getByteCount() smaller than this value are not uploaded
maxBitmapSizeBytes Bitmaps with a getByteCount() larger than this value are not uploaded
preparePrefetch If this is true, also pre-fetching image requests will trigger the prepareToDraw() call.
Returns
  • The Builder itself for chaining

public ImagePipelineConfig.Builder setDecodeCancellationEnabled (boolean decodeCancellationEnabled)

If true we cancel decoding jobs when the related request has been cancelled

Parameters
decodeCancellationEnabled If true the decoding of cancelled requests are cancelled
Returns
  • The Builder itself for chaining

public ImagePipelineConfig.Builder setDownsampleIfLargeBitmap (boolean downsampleIfLargeBitmap)

public ImagePipelineConfig.Builder setEncodedCacheEnabled (boolean encodedCacheEnabled)

public ImagePipelineConfig.Builder setEnsureTranscoderLibraryLoaded (boolean ensureTranscoderLibraryLoaded)

public ImagePipelineConfig.Builder setExperimentalMemoryType (long MemoryType)

public ImagePipelineConfig.Builder setExperimentalThreadHandoffQueueEnabled (boolean experimentalThreadHandoffQueueEnabled)

public ImagePipelineConfig.Builder setGingerbreadDecoderEnabled (boolean gingerbreadDecoderEnabled)

public ImagePipelineConfig.Builder setIsDiskCacheProbingEnabled (boolean isDiskCacheProbingEnabled)

public ImagePipelineConfig.Builder setIsEncodedMemoryCacheProbingEnabled (boolean isEncodedMemoryCacheProbingEnabled)

public ImagePipelineConfig.Builder setKeepCancelledFetchAsLowPriority (boolean keepCancelledFetchAsLowPriority)

public ImagePipelineConfig.Builder setLazyDataSource (Supplier<Boolean> lazyDataSource)

Stores an alternative lazy method to instantiate the data souce.

public ImagePipelineConfig.Builder setMaxBitmapSize (int maxBitmapSize)

Sets the maximum bitmap size use to compute the downsampling value when decoding Jpeg images.

public ImagePipelineConfig.Builder setNativeCodeDisabled (boolean nativeCodeDisabled)

If true, the pipeline will use alternative implementations without native code.

Parameters
nativeCodeDisabled set true for disabling native implementation.
Returns
  • The Builder itself for chaining

public ImagePipelineConfig.Builder setPartialImageCachingEnabled (boolean partialImageCachingEnabled)

Enables the caching of partial image data, for example if the request is cancelled or fails after some data has been received.

public ImagePipelineConfig.Builder setProducerFactoryMethod (ImagePipelineExperiments.ProducerFactoryMethod producerFactoryMethod)

Stores an alternative method to instantiate the ProducerFactory. This allows experimenting with overridden producers.

public ImagePipelineConfig.Builder setShouldDownscaleFrameToDrawableDimensions (boolean downscaleFrameToDrawableDimensions)

public ImagePipelineConfig.Builder setSuppressBitmapPrefetchingSupplier (Supplier<Boolean> suppressBitmapPrefetchingSupplier)

public ImagePipelineConfig.Builder setTrackedKeysSize (int trackedKeysSize)

public ImagePipelineConfig.Builder setUseCombinedNetworkAndCacheProducer (boolean useCombinedNetworkAndCacheProducer)

public ImagePipelineConfig.Builder setUseDownsampligRatioForResizing (boolean useDownsamplingRatioForResizing)

public ImagePipelineConfig.Builder setWebpBitmapFactory (WebpBitmapFactory webpBitmapFactory)

public ImagePipelineConfig.Builder setWebpErrorLogger (WebpBitmapFactory.WebpErrorLogger webpErrorLogger)

public ImagePipelineConfig.Builder setWebpSupportEnabled (boolean webpSupportEnabled)