Java 类com.facebook.imagepipeline.cache.CacheKeyFactory 实例源码

项目:GitHub    文件:PipelineDraweeControllerBuilder.java   
private CacheKey getCacheKey() {
  final ImageRequest imageRequest = getImageRequest();
  final CacheKeyFactory cacheKeyFactory = mImagePipeline.getCacheKeyFactory();
  CacheKey cacheKey = null;
  if (cacheKeyFactory != null && imageRequest != null) {
    if (imageRequest.getPostprocessor() != null) {
      cacheKey = cacheKeyFactory.getPostprocessedBitmapCacheKey(
          imageRequest,
          getCallerContext());
    } else {
      cacheKey = cacheKeyFactory.getBitmapCacheKey(
          imageRequest,
          getCallerContext());
    }
  }
  return cacheKey;
}
项目:GitHub    文件:ImagePipelineExperiments.java   
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);
项目:GitHub    文件:ImagePipeline.java   
public ImagePipeline(
    ProducerSequenceFactory producerSequenceFactory,
    Set<RequestListener> requestListeners,
    Supplier<Boolean> isPrefetchEnabledSupplier,
    MemoryCache<CacheKey, CloseableImage> bitmapMemoryCache,
    MemoryCache<CacheKey, PooledByteBuffer> encodedMemoryCache,
    BufferedDiskCache mainBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    ThreadHandoffProducerQueue threadHandoffProducerQueue,
    Supplier<Boolean> suppressBitmapPrefetchingSupplier) {
  mIdCounter = new AtomicLong();
  mProducerSequenceFactory = producerSequenceFactory;
  mRequestListener = new ForwardingRequestListener(requestListeners);
  mIsPrefetchEnabledSupplier = isPrefetchEnabledSupplier;
  mBitmapMemoryCache = bitmapMemoryCache;
  mEncodedMemoryCache = encodedMemoryCache;
  mMainBufferedDiskCache = mainBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mThreadHandoffProducerQueue = threadHandoffProducerQueue;
  mSuppressBitmapPrefetchingSupplier = suppressBitmapPrefetchingSupplier;
}
项目:fresco    文件:PipelineDraweeControllerBuilder.java   
private CacheKey getCacheKey() {
  final ImageRequest imageRequest = getImageRequest();
  final CacheKeyFactory cacheKeyFactory = mImagePipeline.getCacheKeyFactory();
  CacheKey cacheKey = null;
  if (cacheKeyFactory != null && imageRequest != null) {
    if (imageRequest.getPostprocessor() != null) {
      cacheKey = cacheKeyFactory.getPostprocessedBitmapCacheKey(
          imageRequest,
          getCallerContext());
    } else {
      cacheKey = cacheKeyFactory.getBitmapCacheKey(
          imageRequest,
          getCallerContext());
    }
  }
  return cacheKey;
}
项目:fresco    文件:ImagePipelineExperiments.java   
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);
项目:fresco    文件:ImagePipeline.java   
public ImagePipeline(
    ProducerSequenceFactory producerSequenceFactory,
    Set<RequestListener> requestListeners,
    Supplier<Boolean> isPrefetchEnabledSupplier,
    MemoryCache<CacheKey, CloseableImage> bitmapMemoryCache,
    MemoryCache<CacheKey, PooledByteBuffer> encodedMemoryCache,
    BufferedDiskCache mainBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    ThreadHandoffProducerQueue threadHandoffProducerQueue,
    Supplier<Boolean> suppressBitmapPrefetchingSupplier) {
  mIdCounter = new AtomicLong();
  mProducerSequenceFactory = producerSequenceFactory;
  mRequestListener = new ForwardingRequestListener(requestListeners);
  mIsPrefetchEnabledSupplier = isPrefetchEnabledSupplier;
  mBitmapMemoryCache = bitmapMemoryCache;
  mEncodedMemoryCache = encodedMemoryCache;
  mMainBufferedDiskCache = mainBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mThreadHandoffProducerQueue = threadHandoffProducerQueue;
  mSuppressBitmapPrefetchingSupplier = suppressBitmapPrefetchingSupplier;
}
项目:GitHub    文件:EncodedMemoryCacheProducer.java   
public EncodedMemoryCacheProducer(
    MemoryCache<CacheKey, PooledByteBuffer> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<EncodedImage> inputProducer) {
  mMemoryCache = memoryCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:BitmapMemoryCacheProducer.java   
public BitmapMemoryCacheProducer(
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<CloseableReference<CloseableImage>> inputProducer) {
  mMemoryCache = memoryCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:PostprocessedBitmapMemoryCacheProducer.java   
public PostprocessedBitmapMemoryCacheProducer(
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<CloseableReference<CloseableImage>> inputProducer) {
  mMemoryCache = memoryCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:MediaVariationsFallbackProducer.java   
public MediaVariationsFallbackProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    MediaVariationsIndex mediaVariationsIndex,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mMediaVariationsIndex = mediaVariationsIndex;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:DiskCacheReadProducer.java   
public DiskCacheReadProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:DiskCacheWriteProducer.java   
public DiskCacheWriteProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:DiskCacheWriteProducer.java   
private DiskCacheWriteConsumer(
    final Consumer<EncodedImage> consumer,
    final ProducerContext producerContext,
    final BufferedDiskCache defaultBufferedDiskCache,
    final BufferedDiskCache smallImageBufferedDiskCache,
    final CacheKeyFactory cacheKeyFactory) {
  super(consumer);
  mProducerContext = producerContext;
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
}
项目:GitHub    文件:PartialDiskCacheProducer.java   
public PartialDiskCacheProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    PooledByteBufferFactory pooledByteBufferFactory,
    ByteArrayPool byteArrayPool,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mPooledByteBufferFactory = pooledByteBufferFactory;
  mByteArrayPool = byteArrayPool;
  mInputProducer = inputProducer;
}
项目:fresco    文件:EncodedMemoryCacheProducer.java   
public EncodedMemoryCacheProducer(
    MemoryCache<CacheKey, PooledByteBuffer> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<EncodedImage> inputProducer) {
  mMemoryCache = memoryCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:fresco    文件:BitmapMemoryCacheProducer.java   
public BitmapMemoryCacheProducer(
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<CloseableReference<CloseableImage>> inputProducer) {
  mMemoryCache = memoryCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:fresco    文件:PostprocessedBitmapMemoryCacheProducer.java   
public PostprocessedBitmapMemoryCacheProducer(
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<CloseableReference<CloseableImage>> inputProducer) {
  mMemoryCache = memoryCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:fresco    文件:MediaVariationsFallbackProducer.java   
public MediaVariationsFallbackProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    MediaVariationsIndex mediaVariationsIndex,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mMediaVariationsIndex = mediaVariationsIndex;
  mInputProducer = inputProducer;
}
项目:fresco    文件:DiskCacheReadProducer.java   
public DiskCacheReadProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:fresco    文件:DiskCacheWriteProducer.java   
public DiskCacheWriteProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    BufferedDiskCache smallImageBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mInputProducer = inputProducer;
}
项目:fresco    文件:DiskCacheWriteProducer.java   
private DiskCacheWriteConsumer(
    final Consumer<EncodedImage> consumer,
    final ProducerContext producerContext,
    final BufferedDiskCache defaultBufferedDiskCache,
    final BufferedDiskCache smallImageBufferedDiskCache,
    final CacheKeyFactory cacheKeyFactory) {
  super(consumer);
  mProducerContext = producerContext;
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mSmallImageBufferedDiskCache = smallImageBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
}
项目:fresco    文件:PartialDiskCacheProducer.java   
public PartialDiskCacheProducer(
    BufferedDiskCache defaultBufferedDiskCache,
    CacheKeyFactory cacheKeyFactory,
    PooledByteBufferFactory pooledByteBufferFactory,
    ByteArrayPool byteArrayPool,
    Producer<EncodedImage> inputProducer) {
  mDefaultBufferedDiskCache = defaultBufferedDiskCache;
  mCacheKeyFactory = cacheKeyFactory;
  mPooledByteBufferFactory = pooledByteBufferFactory;
  mByteArrayPool = byteArrayPool;
  mInputProducer = inputProducer;
}
项目:GitHub    文件:EncodedCacheKeyMultiplexProducer.java   
public EncodedCacheKeyMultiplexProducer(
    CacheKeyFactory cacheKeyFactory,
    Producer inputProducer) {
  super(inputProducer);
  mCacheKeyFactory = cacheKeyFactory;
}
项目:GitHub    文件:BitmapMemoryCacheKeyMultiplexProducer.java   
public BitmapMemoryCacheKeyMultiplexProducer(
    CacheKeyFactory cacheKeyFactory,
    Producer inputProducer) {
  super(inputProducer);
  mCacheKeyFactory = cacheKeyFactory;
}
项目:GitHub    文件:BitmapMemoryCacheGetProducer.java   
public BitmapMemoryCacheGetProducer(
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<CloseableReference<CloseableImage>> inputProducer) {
  super(memoryCache, cacheKeyFactory, inputProducer);
}
项目:GitHub    文件:ImagePipelineExperiments.java   
@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);
}
项目:GitHub    文件:ImagePipelineConfig.java   
public CacheKeyFactory getCacheKeyFactory() {
  return mCacheKeyFactory;
}
项目:GitHub    文件:ImagePipelineConfig.java   
public Builder setCacheKeyFactory(CacheKeyFactory cacheKeyFactory) {
  mCacheKeyFactory = cacheKeyFactory;
  return this;
}
项目:GitHub    文件:ProducerFactory.java   
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;
}
项目:GitHub    文件:ImagePipeline.java   
/**
 * @return The CacheKeyFactory implementation used by ImagePipeline
 */
public CacheKeyFactory getCacheKeyFactory() {
  return mCacheKeyFactory;
}
项目:fresco    文件:EncodedCacheKeyMultiplexProducer.java   
public EncodedCacheKeyMultiplexProducer(
    CacheKeyFactory cacheKeyFactory,
    Producer inputProducer) {
  super(inputProducer);
  mCacheKeyFactory = cacheKeyFactory;
}
项目:fresco    文件:BitmapMemoryCacheKeyMultiplexProducer.java   
public BitmapMemoryCacheKeyMultiplexProducer(
    CacheKeyFactory cacheKeyFactory,
    Producer inputProducer) {
  super(inputProducer);
  mCacheKeyFactory = cacheKeyFactory;
}
项目:fresco    文件:BitmapMemoryCacheGetProducer.java   
public BitmapMemoryCacheGetProducer(
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    CacheKeyFactory cacheKeyFactory,
    Producer<CloseableReference<CloseableImage>> inputProducer) {
  super(memoryCache, cacheKeyFactory, inputProducer);
}
项目:fresco    文件:ImagePipelineExperiments.java   
@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);
}
项目:fresco    文件:ImagePipelineConfig.java   
public CacheKeyFactory getCacheKeyFactory() {
  return mCacheKeyFactory;
}
项目:fresco    文件:ImagePipelineConfig.java   
public Builder setCacheKeyFactory(CacheKeyFactory cacheKeyFactory) {
  mCacheKeyFactory = cacheKeyFactory;
  return this;
}
项目:fresco    文件:ProducerFactory.java   
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;
}
项目:fresco    文件:ImagePipeline.java   
/**
 * @return The CacheKeyFactory implementation used by ImagePipeline
 */
public CacheKeyFactory getCacheKeyFactory() {
  return mCacheKeyFactory;
}