diff options
author | Stan Iliev <stani@google.com> | 2019-08-06 15:59:44 -0400 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2019-08-09 15:52:05 -0400 |
commit | 52e4392ed0111a24ac83f0393907e092ceb844f3 (patch) | |
tree | 7905be5cda6dbac53ed9b213e07c2b38001b419f /libs/hwui/renderthread/RenderThread.h | |
parent | 10952defd8e3b7e6d2e416f773ddeb47ea03ed85 (diff) |
Access VectorDrawableAtlas only on RenderThread
VectorDrawableAtlas dtor can run only on RenderThread, because
it releases GPU resources. It is usually CacheManager, which
destroys the atlas on RenderThread in response to trimMemory.
This CL fixes a rare situation, when a Java finalizer thread
deletes the atlas.
Bug: 137722646
Test: Manual testing on a device
Change-Id: I9d900809c23efaead9aaf16ee3306bc8c7c6b379
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h index df7eeb398847..5aa1af32094f 100644 --- a/libs/hwui/renderthread/RenderThread.h +++ b/libs/hwui/renderthread/RenderThread.h @@ -53,6 +53,10 @@ namespace skiapipeline { class VkFunctorDrawHandler; } +namespace VectorDrawable { +class Tree; +} + namespace renderthread { class CanvasContext; @@ -138,6 +142,7 @@ private: friend class android::uirenderer::TestUtils; friend class android::uirenderer::WebViewFunctor; friend class android::uirenderer::skiapipeline::VkFunctorDrawHandler; + friend class android::uirenderer::VectorDrawable::Tree; RenderThread(); virtual ~RenderThread(); |