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

Unified Diff: include/core/SkPicture.h

Issue 239703006: Retract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API (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 | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkRTreePicture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
===================================================================
--- include/core/SkPicture.h (revision 14216)
+++ include/core/SkPicture.h (working copy)
@@ -139,7 +139,16 @@
clip-query calls will reflect the path's bounds, not the actual
path.
*/
- kUsePathBoundsForClip_RecordingFlag = 0x01,
+ kUsePathBoundsForClip_RecordingFlag = 0x01
+ };
+
+#ifndef SK_SUPPORT_DEPRECATED_RECORD_FLAGS
+ // TODO: once kOptimizeForClippedPlayback_RecordingFlag is hidden from
+ // all external consumers, SkPicture::createBBoxHierarchy can also be
+ // cleaned up.
+private:
+#endif
+ enum Deprecated_RecordingFlags {
/* 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
@@ -159,6 +168,9 @@
*/
kOptimizeForClippedPlayback_RecordingFlag = 0x02,
};
+#ifndef SK_SUPPORT_DEPRECATED_RECORD_FLAGS
+public:
+#endif
#ifndef SK_SUPPORT_LEGACY_PICTURE_CAN_RECORD
private:
@@ -336,6 +348,7 @@
// For testing. Derived classes may instantiate an alternate
// SkBBoxHierarchy implementation
virtual SkBBoxHierarchy* createBBoxHierarchy() const;
+
private:
// An OperationList encapsulates a set of operation offsets into the picture byte
// stream along with the CTMs needed for those operation.
@@ -405,6 +418,9 @@
* Allocate a new SkPicture. Return NULL on failure.
*/
virtual SkPicture* create(int width, int height) = 0;
+
+private:
+ typedef SkRefCnt INHERITED;
};
class SK_API SkPictureRecorder : SkNoncopyable {
@@ -427,6 +443,7 @@
SkCanvas* beginRecording(int width, int height, uint32_t recordFlags = 0) {
if (NULL != fFactory) {
fPicture.reset(fFactory->create(width, height));
+ recordFlags |= SkPicture::kOptimizeForClippedPlayback_RecordingFlag;
} else {
fPicture.reset(SkNEW(SkPicture));
}
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkRTreePicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698