Merge "When deleting a path, remove it from the path cache. Bug #4170585"

This commit is contained in:
Romain Guy
2011-03-24 16:05:13 -07:00
committed by Android (Google) Code Review
3 changed files with 13 additions and 5 deletions

View File

@ -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();

View File

@ -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):