| 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_V16_AND_ALL_OTHER_INSTANCES_TO
O | 934 // 1 free bit at 29 |
| 935 kNewFormat_SerializationShift = 29, // requires 1 bit | |
| 936 #endif | |
| 937 kUnused1_SerializationShift = 28, // 1 free bit | 935 kUnused1_SerializationShift = 28, // 1 free bit |
| 938 kDirection_SerializationShift = 26, // requires 2 bits | 936 kDirection_SerializationShift = 26, // requires 2 bits |
| 939 kUnused2_SerializationShift = 25, // 1 free bit | 937 kUnused2_SerializationShift = 25, // 1 free bit |
| 940 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO
O | 938 // 1 free bit at 24 |
| 941 kOldIsOval_SerializationShift = 24, // requires 1 bit | |
| 942 #endif | |
| 943 kConvexity_SerializationShift = 16, // requires 8 bits | 939 kConvexity_SerializationShift = 16, // requires 8 bits |
| 944 kFillType_SerializationShift = 8, // requires 8 bits | 940 kFillType_SerializationShift = 8, // requires 8 bits |
| 945 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO
O | 941 // 8 free bits at 0 |
| 946 kOldSegmentMask_SerializationShift = 0 // requires 4 bits | |
| 947 #endif | |
| 948 }; | 942 }; |
| 949 | 943 |
| 950 SkAutoTUnref<SkPathRef> fPathRef; | 944 SkAutoTUnref<SkPathRef> fPathRef; |
| 951 | 945 |
| 952 int fLastMoveToIndex; | 946 int fLastMoveToIndex; |
| 953 uint8_t fFillType; | 947 uint8_t fFillType; |
| 954 mutable uint8_t fConvexity; | 948 mutable uint8_t fConvexity; |
| 955 mutable uint8_t fDirection; | 949 mutable uint8_t fDirection; |
| 956 #ifdef SK_BUILD_FOR_ANDROID | 950 #ifdef SK_BUILD_FOR_ANDROID |
| 957 const SkPath* fSourcePath; | 951 const SkPath* fSourcePath; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 SkPathRef::Editor ed(&fPathRef); | 1002 SkPathRef::Editor ed(&fPathRef); |
| 1009 | 1003 |
| 1010 ed.setBounds(rect); | 1004 ed.setBounds(rect); |
| 1011 } | 1005 } |
| 1012 | 1006 |
| 1013 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO
O | |
| 1014 friend class SkPathRef; // just for SerializationOffsets | |
| 1015 #endif | |
| 1016 friend class SkAutoPathBoundsUpdate; | 1007 friend class SkAutoPathBoundsUpdate; |
| 1017 friend class SkAutoDisableOvalCheck; | 1008 friend class SkAutoDisableOvalCheck; |
| 1018 friend class SkAutoDisableDirectionCheck; | 1009 friend class SkAutoDisableDirectionCheck; |
| 1019 friend class SkBench_AddPathTest; // perf test reversePathTo | 1010 friend class SkBench_AddPathTest; // perf test reversePathTo |
| 1020 friend class PathTest_Private; // unit test reversePathTo | 1011 friend class PathTest_Private; // unit test reversePathTo |
| 1021 }; | 1012 }; |
| 1022 | 1013 |
| 1023 #endif | 1014 #endif |
| OLD | NEW |