change virtual setMatrixClip() to take a SkClipStack parameter.



git-svn-id: http://skia.googlecode.com/svn/trunk@831 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index a1e6a64..a790399 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 @@
      */
     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 db65e05..2db3380 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -77,7 +77,8 @@
     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 b6bc7be..5bcc8e3 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -64,7 +64,8 @@
         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;