use of com.facebook.fresco.animation.wrapper.AnimatedDrawableCachingBackendWrapper in project fresco by facebook.
the class ExperimentalAnimationFactory method createAnimationBackend.
private AnimationBackend createAnimationBackend(AnimatedImageResult animatedImageResult) {
// Create the animated drawable backend
AnimatedImage animatedImage = animatedImageResult.getImage();
Rect initialBounds = new Rect(0, 0, animatedImage.getWidth(), animatedImage.getHeight());
AnimatedDrawableBackend animatedDrawableBackend = mAnimatedDrawableBackendProvider.get(animatedImageResult, initialBounds);
// Add caching backend
AnimatedDrawableCachingBackend animatedDrawableCachingBackend = mAnimatedDrawableCachingBackendProvider.get(animatedDrawableBackend, AnimatedDrawableOptions.DEFAULTS);
AnimatedDrawableCachingBackendWrapper animatedDrawableCachingBackendWrapper = new AnimatedDrawableCachingBackendWrapper(animatedDrawableCachingBackend);
// Add inactivity check
return AnimationBackendDelegateWithInactivityCheck.createForBackend(animatedDrawableCachingBackendWrapper, mMonotonicClock, mScheduledExecutorServiceForUiThread);
}
Aggregations