OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPath_DEFINED | 8 #ifndef SkPath_DEFINED |
9 #define SkPath_DEFINED | 9 #define SkPath_DEFINED |
10 | 10 |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 | 920 |
921 private: | 921 private: |
922 enum SerializationOffsets { | 922 enum SerializationOffsets { |
923 // 1 free bit at 29 | 923 // 1 free bit at 29 |
924 kUnused1_SerializationShift = 28, // 1 free bit | 924 kUnused1_SerializationShift = 28, // 1 free bit |
925 kDirection_SerializationShift = 26, // requires 2 bits | 925 kDirection_SerializationShift = 26, // requires 2 bits |
926 kIsVolatile_SerializationShift = 25, // requires 1 bit | 926 kIsVolatile_SerializationShift = 25, // requires 1 bit |
927 // 1 free bit at 24 | 927 // 1 free bit at 24 |
928 kConvexity_SerializationShift = 16, // requires 8 bits | 928 kConvexity_SerializationShift = 16, // requires 8 bits |
929 kFillType_SerializationShift = 8, // requires 8 bits | 929 kFillType_SerializationShift = 8, // requires 8 bits |
930 // 8 free bits at 0 | 930 // low-8-bits are version |
| 931 }; |
| 932 |
| 933 enum SerializationVersions { |
| 934 kPathPrivFirstDirection_Version = 1, |
| 935 |
| 936 kCurrent_Version = 1 |
931 }; | 937 }; |
932 | 938 |
933 SkAutoTUnref<SkPathRef> fPathRef; | 939 SkAutoTUnref<SkPathRef> fPathRef; |
934 | 940 |
935 int fLastMoveToIndex; | 941 int fLastMoveToIndex; |
936 uint8_t fFillType; | 942 uint8_t fFillType; |
937 mutable uint8_t fConvexity; | 943 mutable uint8_t fConvexity; |
938 mutable uint8_t fFirstDirection; // SkPathPriv::FirstDirection | 944 mutable uint8_t fFirstDirection; // SkPathPriv::FirstDirection |
939 mutable SkBool8 fIsVolatile; | 945 mutable SkBool8 fIsVolatile; |
940 | 946 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 void setPt(int index, SkScalar x, SkScalar y); | 1000 void setPt(int index, SkScalar x, SkScalar y); |
995 | 1001 |
996 friend class SkAutoPathBoundsUpdate; | 1002 friend class SkAutoPathBoundsUpdate; |
997 friend class SkAutoDisableOvalCheck; | 1003 friend class SkAutoDisableOvalCheck; |
998 friend class SkAutoDisableDirectionCheck; | 1004 friend class SkAutoDisableDirectionCheck; |
999 friend class SkBench_AddPathTest; // perf test reversePathTo | 1005 friend class SkBench_AddPathTest; // perf test reversePathTo |
1000 friend class PathTest_Private; // unit test reversePathTo | 1006 friend class PathTest_Private; // unit test reversePathTo |
1001 }; | 1007 }; |
1002 | 1008 |
1003 #endif | 1009 #endif |
OLD | NEW |