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

Unified Diff: include/core/SkPath.h

Issue 89123002: Move fIsOval from SkPath to SkPathRef (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated to add backwards compatibility from v16 to v15 Created 7 years 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 | include/core/SkPathRef.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPath.h
===================================================================
--- include/core/SkPath.h (revision 12456)
+++ include/core/SkPath.h (working copy)
@@ -151,7 +151,7 @@
* optimization for performance and so some paths that are in
* fact ovals can report false.
*/
- bool isOval(SkRect* rect) const;
+ bool isOval(SkRect* rect) const { return fPathRef->isOval(rect); }
/** Clear any lines and curves from the path, making it empty. This frees up
internal storage associated with those segments.
@@ -931,6 +931,9 @@
private:
enum SerializationOffsets {
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TOO
+ kNewFormat2_SerializationShift = 29, // requires 1 bit
+#endif
#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TOO
kNewFormat_SerializationShift = 28, // requires 1 bit
#endif
@@ -939,7 +942,9 @@
// rename to kUnused_SerializationShift
kOldIsFinite_SerializationShift = 25, // 1 bit
#endif
- kIsOval_SerializationShift = 24, // requires 1 bit
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TOO
+ kOldIsOval_SerializationShift = 24, // requires 1 bit
+#endif
kConvexity_SerializationShift = 16, // requires 8 bits
kFillType_SerializationShift = 8, // requires 8 bits
kSegmentMask_SerializationShift = 0 // requires 4 bits
@@ -952,7 +957,6 @@
uint8_t fSegmentMask;
mutable uint8_t fConvexity;
mutable uint8_t fDirection;
- mutable SkBool8 fIsOval;
#ifdef SK_BUILD_FOR_ANDROID
const SkPath* fSourcePath;
#endif
@@ -1008,7 +1012,7 @@
fPathRef->setBounds(rect);
}
-#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TOO
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TOO
friend class SkPathRef; // just for SerializationOffsets
#endif
friend class SkAutoPathBoundsUpdate;
« no previous file with comments | « no previous file | include/core/SkPathRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698