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);
}
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);
}
Aggregations