use of com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRenderer in project fresco by facebook.
the class ExperimentalBitmapAnimationDrawableFactory method createAnimationBackend.
private AnimationBackend createAnimationBackend(AnimatedImageResult animatedImageResult, @Nullable Bitmap.Config animatedBitmapConig) {
AnimatedDrawableBackend animatedDrawableBackend = createAnimatedDrawableBackend(animatedImageResult);
BitmapFrameCache bitmapFrameCache = createBitmapFrameCache(animatedImageResult);
BitmapFrameRenderer bitmapFrameRenderer = new AnimatedDrawableBackendFrameRenderer(bitmapFrameCache, animatedDrawableBackend);
int numberOfFramesToPrefetch = mNumberOfFramesToPrepareSupplier.get();
BitmapFramePreparationStrategy bitmapFramePreparationStrategy = null;
BitmapFramePreparer bitmapFramePreparer = null;
if (numberOfFramesToPrefetch > 0) {
bitmapFramePreparationStrategy = new FixedNumberBitmapFramePreparationStrategy(numberOfFramesToPrefetch);
bitmapFramePreparer = createBitmapFramePreparer(bitmapFrameRenderer, animatedBitmapConig);
}
BitmapAnimationBackend bitmapAnimationBackend = new BitmapAnimationBackend(mPlatformBitmapFactory, bitmapFrameCache, new AnimatedDrawableBackendAnimationInformation(animatedDrawableBackend), bitmapFrameRenderer, bitmapFramePreparationStrategy, bitmapFramePreparer);
return AnimationBackendDelegateWithInactivityCheck.createForBackend(bitmapAnimationBackend, mMonotonicClock, mScheduledExecutorServiceForUiThread);
}
use of com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRenderer in project fresco by facebook.
the class ExperimentalBitmapAnimationDrawableFactory method createAnimationBackend.
private AnimationBackend createAnimationBackend(AnimatedImageResult animatedImageResult) {
AnimatedDrawableBackend animatedDrawableBackend = createAnimatedDrawableBackend(animatedImageResult);
BitmapFrameCache bitmapFrameCache = createBitmapFrameCache(animatedImageResult);
BitmapAnimationBackend bitmapAnimationBackend = new BitmapAnimationBackend(mPlatformBitmapFactory, bitmapFrameCache, new AnimatedDrawableBackendAnimationInformation(animatedDrawableBackend), new AnimatedDrawableBackendFrameRenderer(bitmapFrameCache, animatedDrawableBackend));
return AnimationBackendDelegateWithInactivityCheck.createForBackend(bitmapAnimationBackend, mMonotonicClock, mScheduledExecutorServiceForUiThread);
}
Aggregations