diff options
| author | 2015-11-10 23:20:03 +0000 | |
|---|---|---|
| committer | 2015-11-10 23:20:03 +0000 | |
| commit | 37bf3ec9d2fb3dfdccfe043e51723e4e543f0703 (patch) | |
| tree | bf733341a7a586f01bb1e9c91c2327813b61b935 /libs/hwui/OpenGLRenderer.cpp | |
| parent | 8d8515e708f0cebf69587750bbb3abcb315cc61e (diff) | |
| parent | 2e4f67c388aff0def50dd619388624f1dbe359ad (diff) | |
Merge "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; } |