Java Code Examples for com.facebook.imagepipeline.common.Priority#LOW

The following examples show how to use com.facebook.imagepipeline.common.Priority#LOW . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImagePipeline.java    From FanXin-based-HuanXin with GNU General Public License v2.0 6 votes vote down vote up
private DataSource<Void> submitPrefetchRequest(
    Producer<Void> producerSequence,
    ImageRequest imageRequest,
    Object callerContext) {
  SettableProducerContext settableProducerContext = new SettableProducerContext(
      imageRequest,
      generateUniqueFutureId(),
      mRequestListener,
      callerContext,
      /* isPrefetch */ true,
      /* isIntermediateResultExpected */ false,
      Priority.LOW);
  return ProducerToDataSourceAdapter.create(
      producerSequence,
      settableProducerContext,
      mRequestListener);
}
 
Example 2
Source File: MultiplexProducer.java    From FanXin-based-HuanXin with GNU General Public License v2.0 5 votes vote down vote up
private synchronized Priority getPriority() {
  Priority priority = Priority.LOW;
  for (Pair<Consumer<CloseableReference<T>>, ProducerContext> pair : mConsumerContextPairs) {
    priority = Priority.getHigherPriority(priority, pair.second.getPriority());
  }
  return priority;
}
 
Example 3
Source File: MultiplexProducer.java    From fresco with MIT License 5 votes vote down vote up
private synchronized Priority computePriority() {
  Priority priority = Priority.LOW;
  for (Pair<Consumer<T>, ProducerContext> pair : mConsumerContextPairs) {
    priority = Priority.getHigherPriority(priority, pair.second.getPriority());
  }
  return priority;
}