aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-22 20:56:26 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-22 20:56:26 +0000
commit46799cd9f0bded51a189d77731b25af159ab4609 (patch)
tree743fb64d8fce77dbfd8d079b96e07dae0a8db17e /include
parent5d32fc4c1cb2a5ee68cd5e195a5959f800cc3bc7 (diff)
change virtual setMatrixClip() to take a SkClipStack parameter.
git-svn-id: http://skia.googlecode.com/svn/trunk@831 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkDevice.h18
-rw-r--r--include/gpu/SkGpuDevice.h3
-rw-r--r--include/pdf/SkPDFDevice.h3
3 files changed, 18 insertions, 6 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index a1e6a64392..a7903993a4 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -23,6 +23,7 @@
#include "SkColor.h"
#include "SkRefDict.h"
+class SkClipStack;
class SkDevice;
class SkDraw;
struct SkIRect;
@@ -122,11 +123,20 @@ public:
*/
virtual SkGpuTexture* accessTexture() { return NULL; }
- /** Called with the correct matrix and clip before this device is drawn
- to using those settings. If your subclass overrides this, be sure to
- call through to the base class as well.
+ /**
+ * Called with the correct matrix and clip before this device is drawn
+ * to using those settings. If your subclass overrides this, be sure to
+ * call through to the base class as well.
+ *
+ * The clipstack is another view of the clip. It records the actual
+ * geometry that went into building the region. It is present for devices
+ * that want to parse it, but is not required: the region is a complete
+ * picture of the current clip. (i.e. if you regionize all of the geometry
+ * in the clipstack, you will arrive at an equivalent region to the one
+ * passed in).
*/
- virtual void setMatrixClip(const SkMatrix&, const SkRegion&);
+ virtual void setMatrixClip(const SkMatrix&, const SkRegion&,
+ const SkClipStack&);
/** Called when this device gains focus (i.e becomes the current device
for drawing).
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index db65e05032..2db33800ed 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -77,7 +77,8 @@ public:
virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap);
virtual void writePixels(const SkBitmap& bitmap, int x, int y);
- virtual void setMatrixClip(const SkMatrix& matrix, const SkRegion& clip);
+ virtual void setMatrixClip(const SkMatrix& matrix, const SkRegion& clip,
+ const SkClipStack&);
virtual void drawPaint(const SkDraw&, const SkPaint& paint);
virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count,
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index b6bc7bed15..5bcc8e3d36 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -64,7 +64,8 @@ public:
to using those settings. If your subclass overrides this, be sure to
call through to the base class as well.
*/
- virtual void setMatrixClip(const SkMatrix&, const SkRegion&);
+ virtual void setMatrixClip(const SkMatrix&, const SkRegion&,
+ const SkClipStack&);
virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) {
return false;