use of com.facebook.fresco.animation.bitmap.BitmapAnimationBackend in project fresco by facebook.
the class ExampleBitmapAnimationFactory method createColorBitmapAnimationBackend.
public static BitmapAnimationBackend createColorBitmapAnimationBackend(final int[] colors, final int animationDurationMs, final BitmapFrameCache bitmapFrameCache) {
BitmapAnimationBackend bitmapAnimationBackend = new BitmapAnimationBackend(Fresco.getImagePipelineFactory().getPlatformBitmapFactory(), bitmapFrameCache, new ColorListAnimationInformation(colors, animationDurationMs), new ColorAndFrameNumberRenderer(colors));
bitmapAnimationBackend.setFrameListener(new DebugBitmapAnimationFrameListener());
return bitmapAnimationBackend;
}
use of com.facebook.fresco.animation.bitmap.BitmapAnimationBackend 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