Index: include/core/SkPicture.h |
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h |
index cebb9a76e7ca67ee76856361cfe2d3880c4cb607..325ffc78e0a15bc49b04b9fb1e9de39a2b774437 100644 |
--- a/include/core/SkPicture.h |
+++ b/include/core/SkPicture.h |
@@ -111,10 +111,20 @@ public: |
SkPicture* clone() const; |
#endif |
- /** Replays the drawing commands on the specified canvas. |
+ /** Replays the drawing commands on the specified canvas. Note that |
+ this has the effect of unfurling this picture into the destination |
+ canvas. Using the SkCanvas::drawPicture entry point gives the destination |
+ canvas the option of just taking a ref. |
@param canvas the canvas receiving the drawing commands. |
+ @param callback a callback that allows interruption of playback |
*/ |
- void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
+ void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
reed1
2014/09/04 15:13:38
I wonder if this class should also be renamed, to
|
+ |
+#ifdef SK_LEGACY_PICTURE_DRAW_API |
+ void draw(SkCanvas* canvas, SkDrawPictureCallback* callback = NULL) const { |
+ this->playback(canvas, callback); |
+ } |
+#endif |
#ifdef SK_LEGACY_PICTURE_SIZE_API |
int width() const { return SkScalarCeilToInt(fCullWidth); } |