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

Unified Diff: include/core/SkPicture.h

Issue 12545009: Adding option in SkPicture to record device-space bounds of draw commands. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | src/core/SkPicture.cpp » ('j') | src/core/SkPicture.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
===================================================================
--- include/core/SkPicture.h (revision 8010)
+++ include/core/SkPicture.h (working copy)
@@ -89,7 +89,7 @@
void clone(SkPicture* pictures, int count) const;
enum RecordingFlags {
- /* This flag specifies that when clipPath() is called, the path will
+ /** This flag specifies that when clipPath() is called, the path will
be faithfully recorded, but the recording canvas' current clip will
only see the path's bounds. This speeds up the recording process
without compromising the fidelity of the playback. The only side-
@@ -98,7 +98,7 @@
path.
*/
kUsePathBoundsForClip_RecordingFlag = 0x01,
- /* This flag causes the picture to compute bounding boxes and build
+ /** This flag causes the picture to compute bounding boxes and build
up a spatial hierarchy (currently an R-Tree), plus a tree of Canvas'
usually stack-based clip/etc state. This requires an increase in
recording time (often ~2x; likely more for very complex pictures),
@@ -115,7 +115,12 @@
Note: Currently this is not serializable, the bounding data will be
discarded if you serialize into a stream and then deserialize.
*/
- kOptimizeForClippedPlayback_RecordingFlag = 0x02
+ kOptimizeForClippedPlayback_RecordingFlag = 0x02,
+ /** This flag causes device-space bounding boxes to be stored for
+ each canvas call that writes pixels. Encoding this information
+ enables several playback optimizations.
+ */
+ kRecordBounds_RecordingFlag = 0x04
};
/** Returns the canvas that records the drawing commands.
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | src/core/SkPicture.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698