Search in sources :

Example 1 with AnimatedDrawableDiagnosticsImpl

use of com.facebook.imagepipeline.animated.impl.AnimatedDrawableDiagnosticsImpl in project fresco by facebook.

the class AnimatedDrawableFactoryImpl method createAnimatedDrawable.

private AnimatedDrawable 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 AnimatedDrawable(mScheduledExecutorServiceForUiThread, animatedDrawableCachingBackend, animatedDrawableDiagnostics, mMonotonicClock);
}
Also used : AnimatedDrawableDiagnosticsImpl(com.facebook.imagepipeline.animated.impl.AnimatedDrawableDiagnosticsImpl) AnimatedDrawableDiagnostics(com.facebook.imagepipeline.animated.base.AnimatedDrawableDiagnostics) DisplayMetrics(android.util.DisplayMetrics) AnimatedDrawableCachingBackend(com.facebook.imagepipeline.animated.base.AnimatedDrawableCachingBackend) AnimatedDrawable(com.facebook.imagepipeline.animated.base.AnimatedDrawable)

Example 2 with AnimatedDrawableDiagnosticsImpl

use of com.facebook.imagepipeline.animated.impl.AnimatedDrawableDiagnosticsImpl 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)2 AnimatedDrawableCachingBackend (com.facebook.imagepipeline.animated.base.AnimatedDrawableCachingBackend)2 AnimatedDrawableDiagnostics (com.facebook.imagepipeline.animated.base.AnimatedDrawableDiagnostics)2 AnimatedDrawableDiagnosticsImpl (com.facebook.imagepipeline.animated.impl.AnimatedDrawableDiagnosticsImpl)2 AnimatedDrawable (com.facebook.imagepipeline.animated.base.AnimatedDrawable)1 AnimatedDrawableSupport (com.facebook.imagepipeline.animated.base.AnimatedDrawableSupport)1