use of com.facebook.imagepipeline.producers.LocalFileFetchProducer in project fresco by facebook.
the class ProducerSequenceFactory method getBackgroundLocalFileFetchToEncodeMemorySequence.
/**
* background-thread hand-off -> multiplex -> encoded cache ->
* disk cache -> (webp transcode) -> local file fetch
*/
private synchronized Producer<EncodedImage> getBackgroundLocalFileFetchToEncodeMemorySequence() {
if (mBackgroundLocalFileFetchToEncodedMemorySequence == null) {
final LocalFileFetchProducer localFileFetchProducer = mProducerFactory.newLocalFileFetchProducer();
final Producer<EncodedImage> toEncodedMultiplexProducer = newEncodedCacheMultiplexToTranscodeSequence(localFileFetchProducer);
mBackgroundLocalFileFetchToEncodedMemorySequence = mProducerFactory.newBackgroundThreadHandoffProducer(toEncodedMultiplexProducer, mThreadHandoffProducerQueue);
}
return mBackgroundLocalFileFetchToEncodedMemorySequence;
}
use of com.facebook.imagepipeline.producers.LocalFileFetchProducer in project fresco by facebook.
the class ProducerSequenceFactory method getLocalImageFileFetchSequence.
/**
* bitmap cache get ->
* background thread hand-off -> multiplex -> bitmap cache -> decode ->
* branch on separate images
* -> exif resize and rotate -> exif thumbnail creation
* -> local image resize and rotate -> add meta data producer -> multiplex -> encoded cache ->
* (webp transcode) -> local file fetch.
*/
private synchronized Producer<CloseableReference<CloseableImage>> getLocalImageFileFetchSequence() {
if (mLocalImageFileFetchSequence == null) {
LocalFileFetchProducer localFileFetchProducer = mProducerFactory.newLocalFileFetchProducer();
mLocalImageFileFetchSequence = newBitmapCacheGetToLocalTransformSequence(localFileFetchProducer);
}
return mLocalImageFileFetchSequence;
}
Aggregations