Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: include/core/SkCanvas.h

Issue 448793004: add drawPicture variant that takes a matrix and paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index f74ebb7f56ff3a93f05efd89b72fdf4e79c4acc5..011e3c3a037dfd1bc1c18b525ef3f08772115aeb 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,7 +1237,7 @@ protected:
virtual void onDiscard();
- virtual void onDrawPicture(const SkPicture* picture);
+ 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
« gm/picture.cpp ('K') | « gyp/gmslides.gypi ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698