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

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: Compiling Created 6 years, 1 month 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/SkRecordDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLayerInfo.h
diff --git a/src/core/SkLayerInfo.h b/src/core/SkLayerInfo.h
index dd0eaf032ab8bc901be86665b7a221101bfcdd66..196f1b93af3b910d327ba84e050fd875dc545212 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,10 @@ 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 operation indices that lead the saveLayer operation.
+ int* fKey;
bsalomon 2014/11/25 13:52:05 Did you consider using SkAutoSTArray here? (It's a
robertphillips 2014/11/25 16:36:47 SkAutoTArray would work if it had a count in Relea
+ int fKeySize; // # of ints
};
SkLayerInfo(Key key) : INHERITED(key) { }
« no previous file with comments | « no previous file | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698