aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-08 21:42:37 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-08 21:42:51 +0000
commit8310f0e051e5cb19206428336720bd9988190416 (patch)
treebb25e8894c83ec124742e23f886fbd6d81d4291a /include/core
parent4749b8c1b899f9f4e440f60c88c880a8765e6dee (diff)
Revert "remove SkClipVisitor"
This reverts commit 91b961d33d1d3e78c212be8738c1c7c468c358ca. Reason for revert: need to update caller in android Original change's description: > remove SkClipVisitor > > With new device clipping, this is unsupported on SkCanvas > > BUG=skia: > > Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424 > Reviewed-on: https://skia-review.googlesource.com/9349 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I22df0c66ec564ca32355179d2ee5ea14bff7b1d5 Reviewed-on: https://skia-review.googlesource.com/9456 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core')
-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