Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: src/core/SkPictureData.cpp

Issue 1409373011: Dedup SkPaths by gen-ID when going to .skp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: not reserved Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.cpp
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 9ed98cf4ff9e0ccc1f33c9760a1feab57312cda1..df636c02eb9594cac4e6caa26cbb4101214b4002 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -46,7 +46,11 @@ SkPictureData::SkPictureData(const SkPictureRecord& record,
fBitmaps = record.fBitmaps;
fPaints = record.fPaints;
- fPaths = record.fPaths;
+
+ fPaths.reset(record.fPaths.count() + 1); // 0 is reserved.
mtklein 2015/10/29 14:15:29 Oops, note to self, remove this. 0's not reserved
+ record.fPaths.foreach([this](const SkPath& path, int n) {
+ fPaths[n] = path;
+ });
this->initForPlayback();
« no previous file with comments | « no previous file | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698