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

Unified Diff: include/core/SkPictureRecorder.h

Issue 253443003: Add snapshot entry point to SkPictureRecorder (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 8 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 | « no previous file | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPictureRecorder.h
===================================================================
--- include/core/SkPictureRecorder.h (revision 14346)
+++ include/core/SkPictureRecorder.h (working copy)
@@ -82,6 +82,18 @@
return NULL;
}
+ /** Create an intermediate SkPicture of the in-progress recording.
+ Future recorded operations will not appear in the snapshot. If no
+ recording is in progress this will return NULL.
+ */
+ SkPicture* snapshot() {
+ if (NULL != fPicture) {
+ return SkNEW_ARGS(SkPicture, (*fPicture));
scroggo 2014/04/25 14:16:52 I haven't followed along with all the picture chan
robertphillips 2014/04/25 14:55:28 Currently - yes. I believe the desire is to not as
scroggo 2014/04/25 15:00:44 When that day comes, what will the Android approac
+ }
+
+ return NULL;
+ }
+
/** Enable/disable all the picture recording optimizations (i.e.,
those in SkPictureRecord). It is mainly intended for testing the
existing optimizations (i.e., to actually have the pattern
« no previous file with comments | « no previous file | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698