Fix TextureView glitch and memory leak
Keep EglImage/VkImage alive until the last SkImage object using
it is destroyed.
Fix memory leak with GL pipeline only, caused by destroying
EGLImage on the wrong thread.
Make sure cached SkImage dtor is invoked on RenderThread.
Bug: 128523183
Bug: 128688107
Test: Ran settings app, systrace and CTS
Change-Id: I32c14c7174a2a97e54fbfaa49dffb4e9a160f90d
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 9298be6..5f43b48 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -41,6 +41,7 @@
namespace android {
class Bitmap;
+class AutoBackendTextureRelease;
namespace uirenderer {
@@ -135,6 +136,7 @@
friend class DispatchFrameCallbacks;
friend class RenderProxy;
friend class DummyVsyncSource;
+ friend class android::AutoBackendTextureRelease;
friend class android::uirenderer::TestUtils;
friend class android::uirenderer::WebViewFunctor;
friend class android::uirenderer::skiapipeline::VkFunctorDrawHandler;