diff options
author | 2015-11-10 23:31:11 +0000 | |
---|---|---|
committer | 2015-11-10 23:31:11 +0000 | |
commit | 1b85ce17a316973a170b3932f2d0a9b02063eaa3 (patch) | |
tree | 7491f4e974e7acb57205781b31d29e045fdc4d19 /libs/hwui/OpenGLRenderer.cpp | |
parent | 16009a6deaff272c94046facbeb567bafdaacc69 (diff) | |
parent | 7516d4d8667957688433b02b2f4985f1b3ab36ad (diff) |
Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2
am: 7516d4d866
* commit '7516d4d8667957688433b02b2f4985f1b3ab36ad':
Fix HWUI Path Cache dangling pointer
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 2292ef415cfc..9621b545fada 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -2325,12 +2325,15 @@ void OpenGLRenderer::drawPath(const SkPath* path, const SkPaint* paint) { PathTexture* texture = mCaches.pathCache.get(path, paint); if (!texture) return; - const AutoTexture autoCleanup(texture); const float x = texture->left - texture->offset; const float y = texture->top - texture->offset; drawPathTexture(texture, x, y, paint); + + if (texture->cleanup) { + mCaches.pathCache.remove(path, paint); + } mDirty = true; } |