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

Unified Diff: include/core/SkPicture.h

Issue 540963002: Change SkPicture::draw to playback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix nanomsg Created 6 years, 3 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
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 7f0665e046d86cb070b33210a3f3fcd5572d72ed..d8aced19ab21cf59b22dbb09d6c8a63b5185e847 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;
+
+#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); }
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698