aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkCanvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r--include/core/SkCanvas.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 840a647e50..3ce4baeb59 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -21,6 +21,7 @@ class GrContext;
class GrRenderTargetContext;
class SkBaseDevice;
class SkBitmap;
+class SkCanvasClipVisitor;
class SkClipStack;
class SkData;
class SkDraw;
@@ -1325,6 +1326,14 @@ public:
*/
const SkMatrix& getTotalMatrix() const;
+ typedef SkCanvasClipVisitor ClipVisitor;
+ /**
+ * Replays the clip operations, back to front, that have been applied to
+ * the canvas, calling the appropriate method on the visitor for each
+ * clip. All clips have already been transformed into device space.
+ */
+ void replayClips(ClipVisitor*) const;
+
///////////////////////////////////////////////////////////////////////////
// don't call
@@ -1732,4 +1741,12 @@ private:
};
#define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore)
+class SkCanvasClipVisitor {
+public:
+ virtual ~SkCanvasClipVisitor();
+ virtual void clipRect(const SkRect&, SkClipOp, bool antialias) = 0;
+ virtual void clipRRect(const SkRRect&, SkClipOp, bool antialias) = 0;
+ virtual void clipPath(const SkPath&, SkClipOp, bool antialias) = 0;
+};
+
#endif