Search in sources :

Example 1 with AnimatedDrawableSupport

use of com.facebook.imagepipeline.animated.base.AnimatedDrawableSupport in project fresco by facebook.

the class AnimatedDrawableFactoryImplSupport method createAnimatedDrawable.

private AnimatedDrawableSupport createAnimatedDrawable(AnimatedDrawableOptions options, AnimatedDrawableBackend animatedDrawableBackend) {
    DisplayMetrics displayMetrics = mResources.getDisplayMetrics();
    AnimatedDrawableDiagnostics animatedDrawableDiagnostics;
    AnimatedDrawableCachingBackend animatedDrawableCachingBackend = mAnimatedDrawableCachingBackendProvider.get(animatedDrawableBackend, options);
    if (options.enableDebugging) {
        animatedDrawableDiagnostics = new AnimatedDrawableDiagnosticsImpl(mAnimatedDrawableUtil, displayMetrics);
    } else {
        animatedDrawableDiagnostics = AnimatedDrawableDiagnosticsNoop.getInstance();
    }
    return new AnimatedDrawableSupport(mScheduledExecutorServiceForUiThread, animatedDrawableCachingBackend, animatedDrawableDiagnostics, mMonotonicClock);
}
Also used : AnimatedDrawableDiagnosticsImpl(com.facebook.imagepipeline.animated.impl.AnimatedDrawableDiagnosticsImpl) AnimatedDrawableDiagnostics(com.facebook.imagepipeline.animated.base.AnimatedDrawableDiagnostics) AnimatedDrawableSupport(com.facebook.imagepipeline.animated.base.AnimatedDrawableSupport) DisplayMetrics(android.util.DisplayMetrics) AnimatedDrawableCachingBackend(com.facebook.imagepipeline.animated.base.AnimatedDrawableCachingBackend)

Aggregations

DisplayMetrics (android.util.DisplayMetrics)1 AnimatedDrawableCachingBackend (com.facebook.imagepipeline.animated.base.AnimatedDrawableCachingBackend)1 AnimatedDrawableDiagnostics (com.facebook.imagepipeline.animated.base.AnimatedDrawableDiagnostics)1 AnimatedDrawableSupport (com.facebook.imagepipeline.animated.base.AnimatedDrawableSupport)1 AnimatedDrawableDiagnosticsImpl (com.facebook.imagepipeline.animated.impl.AnimatedDrawableDiagnosticsImpl)1