Search in sources :

Example 1 with CacheKeyFactory

use of com.facebook.imagepipeline.cache.CacheKeyFactory in project fresco by facebook.

the class PipelineDraweeControllerBuilder method getCacheKey.

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;
}
Also used : CacheKeyFactory(com.facebook.imagepipeline.cache.CacheKeyFactory) ImageRequest(com.facebook.imagepipeline.request.ImageRequest) CacheKey(com.facebook.cache.common.CacheKey)

Aggregations

CacheKey (com.facebook.cache.common.CacheKey)1 CacheKeyFactory (com.facebook.imagepipeline.cache.CacheKeyFactory)1 ImageRequest (com.facebook.imagepipeline.request.ImageRequest)1