Search in sources :

Example 1 with LocalFileFetchProducer

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;
}
Also used : LocalFileFetchProducer(com.facebook.imagepipeline.producers.LocalFileFetchProducer) EncodedImage(com.facebook.imagepipeline.image.EncodedImage)

Example 2 with LocalFileFetchProducer

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;
}
Also used : LocalFileFetchProducer(com.facebook.imagepipeline.producers.LocalFileFetchProducer)

Aggregations

LocalFileFetchProducer (com.facebook.imagepipeline.producers.LocalFileFetchProducer)2 EncodedImage (com.facebook.imagepipeline.image.EncodedImage)1