use of com.facebook.imagepipeline.producers.LocalContentUriFetchProducer in project fresco by facebook.
the class ProducerSequenceFactory method getLocalContentUriFetchSequence.
/**
* bitmap cache get -> background thread hand-off -> multiplex -> bitmap cache -> decode -> branch
* on separate images -> thumbnail resize and rotate -> thumbnail branch -> local content
* thumbnail creation -> exif thumbnail creation -> local image resize and rotate -> add meta data
* producer -> multiplex -> encoded cache -> (webp transcode) -> local content uri fetch.
*/
private synchronized Producer<CloseableReference<CloseableImage>> getLocalContentUriFetchSequence() {
if (mLocalContentUriFetchSequence == null) {
LocalContentUriFetchProducer localContentUriFetchProducer = mProducerFactory.newLocalContentUriFetchProducer();
ThumbnailProducer<EncodedImage>[] thumbnailProducers = new ThumbnailProducer[2];
thumbnailProducers[0] = mProducerFactory.newLocalContentUriThumbnailFetchProducer();
thumbnailProducers[1] = mProducerFactory.newLocalExifThumbnailProducer();
mLocalContentUriFetchSequence = newBitmapCacheGetToLocalTransformSequence(localContentUriFetchProducer, thumbnailProducers);
}
return mLocalContentUriFetchSequence;
}
use of com.facebook.imagepipeline.producers.LocalContentUriFetchProducer in project fresco by facebook.
the class ProducerSequenceFactory method getBackgroundLocalContentUriFetchToEncodeMemorySequence.
/**
* background-thread hand-off -> multiplex -> encoded cache -> disk cache -> (webp transcode) ->
* local content resolver fetch
*/
private synchronized Producer<EncodedImage> getBackgroundLocalContentUriFetchToEncodeMemorySequence() {
if (FrescoSystrace.isTracing()) {
FrescoSystrace.beginSection("ProducerSequenceFactory#getBackgroundLocalContentUriFetchToEncodeMemorySequence");
}
if (mBackgroundLocalContentUriFetchToEncodedMemorySequence == null) {
if (FrescoSystrace.isTracing()) {
FrescoSystrace.beginSection("ProducerSequenceFactory#getBackgroundLocalContentUriFetchToEncodeMemorySequence:init");
}
final LocalContentUriFetchProducer localFileFetchProducer = mProducerFactory.newLocalContentUriFetchProducer();
final Producer<EncodedImage> toEncodedMultiplexProducer = newEncodedCacheMultiplexToTranscodeSequence(localFileFetchProducer);
mBackgroundLocalContentUriFetchToEncodedMemorySequence = mProducerFactory.newBackgroundThreadHandoffProducer(toEncodedMultiplexProducer, mThreadHandoffProducerQueue);
if (FrescoSystrace.isTracing()) {
FrescoSystrace.endSection();
}
}
if (FrescoSystrace.isTracing()) {
FrescoSystrace.endSection();
}
return mBackgroundLocalContentUriFetchToEncodedMemorySequence;
}
Aggregations