Loading core/jni/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,6 @@ cc_library_static { "android_view_RenderNode.cpp", "android_util_PathParser.cpp", "android/graphics/AnimatedImageDrawable.cpp", "android/graphics/Bitmap.cpp", "android/graphics/BitmapFactory.cpp", "android/graphics/ByteBufferStreamAdaptor.cpp", Loading Loading @@ -436,6 +435,7 @@ cc_library_static { "android_view_TextureLayer.cpp", "android_view_ThreadedRenderer.cpp", "android/graphics/AnimatedImageDrawable.cpp", "android/graphics/BitmapRegionDecoder.cpp", "android/graphics/GIFMovie.cpp", "android/graphics/Movie.cpp", Loading libs/hwui/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,6 @@ cc_defaults { "renderthread/RenderTask.cpp", "renderthread/TimeLord.cpp", "hwui/AnimatedImageDrawable.cpp", "hwui/AnimatedImageThread.cpp", "hwui/Bitmap.cpp", "hwui/Canvas.cpp", "hwui/ImageDecoder.cpp", Loading Loading @@ -213,6 +212,7 @@ cc_defaults { android: { srcs: [ "hwui/AnimatedImageThread.cpp", "pipeline/skia/ATraceMemoryDump.cpp", "pipeline/skia/GLFunctorDrawable.cpp", "pipeline/skia/LayerDrawable.cpp", Loading libs/hwui/hwui/AnimatedImageDrawable.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ */ #include "AnimatedImageDrawable.h" #ifdef __ANDROID__ // Layoutlib does not support AnimatedImageThread #include "AnimatedImageThread.h" #endif #include "utils/TraceUtils.h" Loading Loading @@ -160,8 +162,10 @@ void AnimatedImageDrawable::onDraw(SkCanvas* canvas) { } else if (starting) { // The image has animated, and now is being reset. Queue up the first // frame, but keep showing the current frame until the first is ready. #ifdef __ANDROID__ // Layoutlib does not support AnimatedImageThread auto& thread = uirenderer::AnimatedImageThread::getInstance(); mNextSnapshot = thread.reset(sk_ref_sp(this)); #endif } bool finalFrame = false; Loading @@ -187,8 +191,10 @@ void AnimatedImageDrawable::onDraw(SkCanvas* canvas) { } if (mRunning && !mNextSnapshot.valid()) { #ifdef __ANDROID__ // Layoutlib does not support AnimatedImageThread auto& thread = uirenderer::AnimatedImageThread::getInstance(); mNextSnapshot = thread.decodeNextFrame(sk_ref_sp(this)); #endif } if (!drawDirectly) { Loading Loading
core/jni/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,6 @@ cc_library_static { "android_view_RenderNode.cpp", "android_util_PathParser.cpp", "android/graphics/AnimatedImageDrawable.cpp", "android/graphics/Bitmap.cpp", "android/graphics/BitmapFactory.cpp", "android/graphics/ByteBufferStreamAdaptor.cpp", Loading Loading @@ -436,6 +435,7 @@ cc_library_static { "android_view_TextureLayer.cpp", "android_view_ThreadedRenderer.cpp", "android/graphics/AnimatedImageDrawable.cpp", "android/graphics/BitmapRegionDecoder.cpp", "android/graphics/GIFMovie.cpp", "android/graphics/Movie.cpp", Loading
libs/hwui/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,6 @@ cc_defaults { "renderthread/RenderTask.cpp", "renderthread/TimeLord.cpp", "hwui/AnimatedImageDrawable.cpp", "hwui/AnimatedImageThread.cpp", "hwui/Bitmap.cpp", "hwui/Canvas.cpp", "hwui/ImageDecoder.cpp", Loading Loading @@ -213,6 +212,7 @@ cc_defaults { android: { srcs: [ "hwui/AnimatedImageThread.cpp", "pipeline/skia/ATraceMemoryDump.cpp", "pipeline/skia/GLFunctorDrawable.cpp", "pipeline/skia/LayerDrawable.cpp", Loading
libs/hwui/hwui/AnimatedImageDrawable.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ */ #include "AnimatedImageDrawable.h" #ifdef __ANDROID__ // Layoutlib does not support AnimatedImageThread #include "AnimatedImageThread.h" #endif #include "utils/TraceUtils.h" Loading Loading @@ -160,8 +162,10 @@ void AnimatedImageDrawable::onDraw(SkCanvas* canvas) { } else if (starting) { // The image has animated, and now is being reset. Queue up the first // frame, but keep showing the current frame until the first is ready. #ifdef __ANDROID__ // Layoutlib does not support AnimatedImageThread auto& thread = uirenderer::AnimatedImageThread::getInstance(); mNextSnapshot = thread.reset(sk_ref_sp(this)); #endif } bool finalFrame = false; Loading @@ -187,8 +191,10 @@ void AnimatedImageDrawable::onDraw(SkCanvas* canvas) { } if (mRunning && !mNextSnapshot.valid()) { #ifdef __ANDROID__ // Layoutlib does not support AnimatedImageThread auto& thread = uirenderer::AnimatedImageThread::getInstance(); mNextSnapshot = thread.decodeNextFrame(sk_ref_sp(this)); #endif } if (!drawDirectly) { Loading