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

Unified Diff: src/core/SkLayerInfo.h

Issue 753253002: Use variable length key (rather than accumulated matrix) as save layer hoisting key (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 6 years 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
Index: src/core/SkLayerInfo.h
diff --git a/src/core/SkLayerInfo.h b/src/core/SkLayerInfo.h
index dd0eaf032ab8bc901be86665b7a221101bfcdd66..6ed77c993c117769a739c3e29acd9d8459d46a0b 100644
--- a/src/core/SkLayerInfo.h
+++ b/src/core/SkLayerInfo.h
@@ -18,8 +18,8 @@ public:
// Information about a given saveLayer/restore block in an SkPicture
class BlockInfo {
public:
- BlockInfo() : fPicture(NULL), fPaint(NULL) {}
- ~BlockInfo() { SkSafeUnref(fPicture); SkDELETE(fPaint); }
+ BlockInfo() : fPicture(NULL), fPaint(NULL), fKey(NULL), fKeySize(0) {}
+ ~BlockInfo() { SkSafeUnref(fPicture); SkDELETE(fPaint); SkDELETE_ARRAY(fKey); }
// The picture owning the layer. If the owning picture is the top-most
// one (i.e., the picture for which this SkLayerInfo was created) then
@@ -50,6 +50,11 @@ public:
bool fHasNestedLayers;
// True if this saveLayer is nested within another. False otherwise.
bool fIsNested;
+ // The variable length key for this saveLayer block. It stores the
+ // thread of drawPicture and saveLayer operation indices that lead to this
+ // saveLayer (including its own op index). The BlockInfo owns this memory.
+ int* fKey;
+ int fKeySize; // # of ints
};
SkLayerInfo(Key key) : INHERITED(key) { }

Powered by Google App Engine
This is Rietveld 408576698