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

Unified Diff: src/core/SkMatrixClipStateMgr.h

Issue 176413002: Simplify storage of MC State stack (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 10 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/SkMatrixClipStateMgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMatrixClipStateMgr.h
===================================================================
--- src/core/SkMatrixClipStateMgr.h (revision 13551)
+++ src/core/SkMatrixClipStateMgr.h (working copy)
@@ -53,7 +53,7 @@
static const int32_t kIdentityWideOpenStateID = 0;
static const int kIdentityMatID = 0;
- class MatrixClipState {
+ class MatrixClipState : public SkNoncopyable {
public:
class MatrixInfo {
public:
@@ -104,6 +104,8 @@
private:
SkMatrix fMatrix;
int fMatrixID;
+
+ typedef SkNoncopyable INHERITED;
};
class ClipInfo : public SkNoncopyable {
@@ -162,7 +164,7 @@
ClipType fClipType;
union {
- SkRRect fRRect; // also stores clipRect
+ SkRRect fRRect; // also stores clip rect
int fPathID;
int fRegionID;
} fGeom;
@@ -236,8 +238,7 @@
// Does this MC state represent a saveLayer call?
bool fIsSaveLayer;
- // The next two fields are only valid when fIsSaveLayer is set.
- int32_t fSaveLayerBaseStateID;
+ // The next field is only valid when fIsSaveLayer is set.
SkTDArray<int>* fSavedSkipOffsets;
// Does the MC state have an open block in the skp?
@@ -399,11 +400,15 @@
return fMatrixDict[index];
}
- bool isCurrentlyOpen(int32_t stateID);
+ bool isNestingMCState(int stateID);
#ifdef SK_DEBUG
int fActualDepth;
#endif
+
+ // save layers are nested within a specific MC state. This stack tracks
+ // the nesting MC state's ID as save layers are pushed and popped.
+ SkTDArray<int> fStateIDStack;
};
#endif
« no previous file with comments | « no previous file | src/core/SkMatrixClipStateMgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698