Java Code Examples for com.facebook.imagepipeline.request.ImageRequest#getProgressiveRenderingEnabled()
The following examples show how to use
com.facebook.imagepipeline.request.ImageRequest#getProgressiveRenderingEnabled() .
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 |
private <T> DataSource<CloseableReference<T>> submitFetchRequest( Producer<CloseableReference<T>> producerSequence, ImageRequest imageRequest, Object callerContext) { SettableProducerContext settableProducerContext = new SettableProducerContext( imageRequest, generateUniqueFutureId(), mRequestListener, callerContext, /* isPrefetch */ false, imageRequest.getProgressiveRenderingEnabled() || !UriUtil.isNetworkUri(imageRequest.getSourceUri()), Priority.HIGH); return CloseableProducerToDataSourceAdapter.create( producerSequence, settableProducerContext, mRequestListener); }
Example 2
Source File: ImagePipeline.java From fresco with MIT License | 4 votes |
private <T> DataSource<CloseableReference<T>> submitFetchRequest( Producer<CloseableReference<T>> producerSequence, ImageRequest imageRequest, ImageRequest.RequestLevel lowestPermittedRequestLevelOnSubmit, Object callerContext, @Nullable RequestListener requestListener, @Nullable String uiComponentId) { if (FrescoSystrace.isTracing()) { FrescoSystrace.beginSection("ImagePipeline#submitFetchRequest"); } final RequestListener2 requestListener2 = new InternalRequestListener( getRequestListenerForRequest(imageRequest, requestListener), mRequestListener2); if (mCallerContextVerifier != null) { mCallerContextVerifier.verifyCallerContext(callerContext, false); } try { ImageRequest.RequestLevel lowestPermittedRequestLevel = ImageRequest.RequestLevel.getMax( imageRequest.getLowestPermittedRequestLevel(), lowestPermittedRequestLevelOnSubmit); SettableProducerContext settableProducerContext = new SettableProducerContext( imageRequest, generateUniqueFutureId(), uiComponentId, requestListener2, callerContext, lowestPermittedRequestLevel, /* isPrefetch */ false, imageRequest.getProgressiveRenderingEnabled() || !UriUtil.isNetworkUri(imageRequest.getSourceUri()), imageRequest.getPriority(), mConfig); return CloseableProducerToDataSourceAdapter.create( producerSequence, settableProducerContext, requestListener2); } catch (Exception exception) { return DataSources.immediateFailedDataSource(exception); } finally { if (FrescoSystrace.isTracing()) { FrescoSystrace.endSection(); } } }