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

Unified Diff: include/core/SkClipStack.h

Issue 269693003: SkClipStack::Element tweaks. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebased Created 6 years, 6 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 | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkClipStack.h
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index 028d5515606815c82de9d3c232edf8d97eb23e85..4243cee7b06fd84d2d89dade74992c70f9db8f3e 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -16,6 +16,7 @@
#include "SkTDArray.h"
#include "SkTLazy.h"
+class SkCanvasClipVisitor;
// Because a single save/restore state can have multiple clips, this class
// stores the stack depth (fSaveCount) and clips (fDeque) separately.
@@ -74,6 +75,9 @@ public:
//!< Call to get the type of the clip element.
Type getType() const { return fType; }
+ //!< Call to get the save count associated with this clip element.
+ int getSaveCount() const { return fSaveCount; }
+
//!< Call if getType() is kPath to get the path.
const SkPath& getPath() const { SkASSERT(kPath_Type == fType); return *fPath.get(); }
@@ -156,6 +160,11 @@ public:
return kPath_Type == fType && fPath.get()->isInverseFillType();
}
+ /**
+ * Replay this clip into the visitor.
+ */
+ void replay(SkCanvasClipVisitor*) const;
+
private:
friend class SkClipStack;
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698