コード例 #1
0
 @Override
 public void produceResults(
     final Consumer<CloseableReference<CloseableImage>> consumer,
     final ProducerContext producerContext) {
   final ImageRequest imageRequest = producerContext.getImageRequest();
   ProgressiveDecoder progressiveDecoder;
   if (!UriUtil.isNetworkUri(imageRequest.getSourceUri())) {
     progressiveDecoder = new LocalImagesProgressiveDecoder(consumer, producerContext);
   } else {
     ProgressiveJpegParser jpegParser = new ProgressiveJpegParser(mByteArrayPool);
     progressiveDecoder =
         new NetworkImagesProgressiveDecoder(
             consumer, producerContext, jpegParser, mProgressiveJpegConfig);
   }
   mInputProducer.produceResults(progressiveDecoder, producerContext);
 }
コード例 #2
0
 public void produceResults(Consumer consumer, ProducerContext producercontext) {
   consumer = new OnFirstImageConsumer(consumer, producercontext);
   mNextProducer1.produceResults(consumer, producercontext);
 }
コード例 #3
0
 void produceResultsInternal(Consumer<T> consumer, ProducerContext producerContext) {
   ProducerListener producerListener = producerContext.getListener();
   producerListener.onProducerFinishWithSuccess(producerContext.getId(), PRODUCER_NAME, null);
   mInputProducer.produceResults(new ThrottlerConsumer(consumer), producerContext);
 }