diff options
author | Romain Guy <romainguy@google.com> | 2011-03-24 16:05:13 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-24 16:05:13 -0700 |
commit | ad575f4dda3391baf9fcab927e65afbee32e7b95 (patch) | |
tree | 1d7a59a8adbd122fe02dac849462171e76ca3d1c /libs/hwui | |
parent | 8a40f6a6324387b324c998cd9d6af900f1dca5ab (diff) | |
parent | 1af23a32d879db330eb5a08b21090ec60b604a32 (diff) | |
download | frameworks_base-ad575f4dda3391baf9fcab927e65afbee32e7b95.zip frameworks_base-ad575f4dda3391baf9fcab927e65afbee32e7b95.tar.gz frameworks_base-ad575f4dda3391baf9fcab927e65afbee32e7b95.tar.bz2 |
Merge "When deleting a path, remove it from the path cache. Bug #4170585"
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/ShapeCache.h | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index bf1182c..c7459d1 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -93,7 +93,9 @@ void DisplayList::clearResources() { mPaints.clear(); for (size_t i = 0; i < mPaths.size(); i++) { - delete mPaths.itemAt(i); + SkPath* path = mPaths.itemAt(i); + caches.pathCache.remove(path); + delete path; } mPaths.clear(); diff --git a/libs/hwui/ShapeCache.h b/libs/hwui/ShapeCache.h index 859e503..b5cc29c 100644 --- a/libs/hwui/ShapeCache.h +++ b/libs/hwui/ShapeCache.h @@ -89,8 +89,11 @@ struct ShapeCacheEntry { join = SkPaint::kDefault_Join; cap = SkPaint::kDefault_Cap; style = SkPaint::kFill_Style; - miter = 4.0f; - strokeWidth = 1.0f; + float v = 4.0f; + miter = *(uint32_t*) &v; + v = 1.0f; + strokeWidth = *(uint32_t*) &v; + pathEffect = NULL; } ShapeCacheEntry(const ShapeCacheEntry& entry): |