Search in sources :

Example 1 with DecodeProducer

use of com.facebook.imagepipeline.producers.DecodeProducer in project fresco by facebook.

the class ProducerSequenceFactory method newBitmapCacheGetToDecodeSequence.

/**
 * Same as {@code newBitmapCacheGetToBitmapCacheSequence} but with an extra DecodeProducer.
 *
 * @param inputProducer producer providing the input to the decode
 * @return bitmap cache get to decode sequence
 */
private Producer<CloseableReference<CloseableImage>> newBitmapCacheGetToDecodeSequence(Producer<EncodedImage> inputProducer) {
    if (FrescoSystrace.isTracing()) {
        FrescoSystrace.beginSection("ProducerSequenceFactory#newBitmapCacheGetToDecodeSequence");
    }
    DecodeProducer decodeProducer = mProducerFactory.newDecodeProducer(inputProducer);
    Producer<CloseableReference<CloseableImage>> result = newBitmapCacheGetToBitmapCacheSequence(decodeProducer);
    if (FrescoSystrace.isTracing()) {
        FrescoSystrace.endSection();
    }
    return result;
}
Also used : CloseableReference(com.facebook.common.references.CloseableReference) DecodeProducer(com.facebook.imagepipeline.producers.DecodeProducer)

Aggregations

CloseableReference (com.facebook.common.references.CloseableReference)1 DecodeProducer (com.facebook.imagepipeline.producers.DecodeProducer)1