summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2015-11-10 23:36:27 +0000
committer android-build-merger <android-build-merger@google.com> 2015-11-10 23:36:27 +0000
commit9557dcd53b5e2926f6d500e4e91c6b4f4abacdf3 (patch)
tree86c2fa1df8cfe9de52572d5aadcd421f713e8b88 /libs/hwui/OpenGLRenderer.cpp
parent246b5a0993978202b19a7c02d355fddfd9506798 (diff)
parent1b85ce17a316973a170b3932f2d0a9b02063eaa3 (diff)
Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2 am: 7516d4d866
am: 1b85ce17a3 * commit '1b85ce17a316973a170b3932f2d0a9b02063eaa3': Fix HWUI Path Cache dangling pointer
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 8c3603b153b9..12c4607130ca 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -2255,12 +2255,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;
}