Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkPath_DEFINED | 10 #ifndef SkPath_DEFINED |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 924 const SkPath* getSourcePath() const; | 924 const SkPath* getSourcePath() const; |
| 925 void setSourcePath(const SkPath* path); | 925 void setSourcePath(const SkPath* path); |
| 926 #else | 926 #else |
| 927 static const int kPathRefGenIDBitCnt = 32; | 927 static const int kPathRefGenIDBitCnt = 32; |
| 928 #endif | 928 #endif |
| 929 | 929 |
| 930 SkDEBUGCODE(void validate() const;) | 930 SkDEBUGCODE(void validate() const;) |
| 931 | 931 |
| 932 private: | 932 private: |
| 933 enum SerializationOffsets { | 933 enum SerializationOffsets { |
| 934 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO O | |
| 935 kNewFormat_SerializationShift = 28, // requires 1 bit | |
| 936 #endif | |
| 937 kDirection_SerializationShift = 26, // requires 2 bits | 934 kDirection_SerializationShift = 26, // requires 2 bits |
| 938 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO O | 935 kUnused_SerializationShift = 25, // requires 1 bit |
|
mtklein
2013/11/26 14:26:24
maybe // 1 free bit ?
| |
| 939 // rename to kUnused_SerializationShift | |
| 940 kOldIsFinite_SerializationShift = 25, // 1 bit | |
| 941 #endif | |
| 942 kIsOval_SerializationShift = 24, // requires 1 bit | 936 kIsOval_SerializationShift = 24, // requires 1 bit |
| 943 kConvexity_SerializationShift = 16, // requires 8 bits | 937 kConvexity_SerializationShift = 16, // requires 8 bits |
| 944 kFillType_SerializationShift = 8, // requires 8 bits | 938 kFillType_SerializationShift = 8, // requires 8 bits |
| 945 kSegmentMask_SerializationShift = 0 // requires 4 bits | 939 kSegmentMask_SerializationShift = 0 // requires 4 bits |
| 946 }; | 940 }; |
| 947 | 941 |
| 948 SkAutoTUnref<SkPathRef> fPathRef; | 942 SkAutoTUnref<SkPathRef> fPathRef; |
| 949 | 943 |
| 950 int fLastMoveToIndex; | 944 int fLastMoveToIndex; |
| 951 uint8_t fFillType; | 945 uint8_t fFillType; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1001 SkDEBUGCODE(this->validate();) | 995 SkDEBUGCODE(this->validate();) |
| 1002 return fPathRef->hasComputedBounds(); | 996 return fPathRef->hasComputedBounds(); |
| 1003 } | 997 } |
| 1004 | 998 |
| 1005 | 999 |
| 1006 // 'rect' needs to be sorted | 1000 // 'rect' needs to be sorted |
| 1007 void setBounds(const SkRect& rect) { | 1001 void setBounds(const SkRect& rect) { |
| 1008 fPathRef->setBounds(rect); | 1002 fPathRef->setBounds(rect); |
| 1009 } | 1003 } |
| 1010 | 1004 |
| 1011 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO O | |
| 1012 friend class SkPathRef; // just for SerializationOffsets | |
| 1013 #endif | |
| 1014 friend class SkAutoPathBoundsUpdate; | 1005 friend class SkAutoPathBoundsUpdate; |
| 1015 friend class SkAutoDisableOvalCheck; | 1006 friend class SkAutoDisableOvalCheck; |
| 1016 friend class SkAutoDisableDirectionCheck; | 1007 friend class SkAutoDisableDirectionCheck; |
| 1017 friend class SkBench_AddPathTest; // perf test reversePathTo | 1008 friend class SkBench_AddPathTest; // perf test reversePathTo |
| 1018 friend class PathTest_Private; // unit test reversePathTo | 1009 friend class PathTest_Private; // unit test reversePathTo |
| 1019 }; | 1010 }; |
| 1020 | 1011 |
| 1021 #endif | 1012 #endif |
| OLD | NEW |