Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index eef9d9004a4f6f7502ef31b809f4b6746baf0299..791511e768088720ad5dd9192bc5a64fd21dd1a1 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -973,6 +973,20 @@ public: |
*/ |
void drawPicture(const SkPicture* picture); |
+ /** |
+ * Draw the picture into this canvas. |
+ * |
+ * If matrix is non-null, apply that matrix to the CTM when drawing this picture. This is |
+ * logically equivalent to |
+ * save/concat/drawPicture/restore |
+ * |
+ * If paint is non-null, draw the picture into a temporary buffer, and then apply the paint's |
+ * alpha/colorfilter/imagefilter/xfermode to that buffer as it is drawn to the canvas. |
+ * This is logically equivalent to |
+ * saveLayer(paint)/drawPicture/restore |
+ */ |
+ void drawPicture(const SkPicture*, const SkMatrix* matrix, const SkPaint* paint); |
+ |
enum VertexMode { |
kTriangles_VertexMode, |
kTriangleStrip_VertexMode, |
@@ -1223,9 +1237,9 @@ protected: |
virtual void onDiscard(); |
- virtual void onDrawPicture(const SkPicture* picture); |
// temporary, until we can migrate existing overrides in chrome |
- virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) {} |
+ virtual void onDrawPicture(const SkPicture*) {} |
+ virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*); |
// Returns the canvas to be used by DrawIter. Default implementation |
// returns this. Subclasses that encapsulate an indirect canvas may |