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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 | 912 |
913 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 913 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
914 static const int kPathRefGenIDBitCnt = 30; // leave room for the fill type (
skbug.com/1762) | 914 static const int kPathRefGenIDBitCnt = 30; // leave room for the fill type (
skbug.com/1762) |
915 #else | 915 #else |
916 static const int kPathRefGenIDBitCnt = 32; | 916 static const int kPathRefGenIDBitCnt = 32; |
917 #endif | 917 #endif |
918 | 918 |
919 SkDEBUGCODE(void validate() const;) | 919 SkDEBUGCODE(void validate() const;) |
920 SkDEBUGCODE(void experimentalValidateRef() const { fPathRef->validate(); } ) | 920 SkDEBUGCODE(void experimentalValidateRef() const { fPathRef->validate(); } ) |
921 | 921 |
| 922 SkPathRef* pathRef() const { return fPathRef; } |
| 923 |
922 private: | 924 private: |
923 enum SerializationOffsets { | 925 enum SerializationOffsets { |
924 // 1 free bit at 29 | 926 // 1 free bit at 29 |
925 kUnused1_SerializationShift = 28, // 1 free bit | 927 kUnused1_SerializationShift = 28, // 1 free bit |
926 kDirection_SerializationShift = 26, // requires 2 bits | 928 kDirection_SerializationShift = 26, // requires 2 bits |
927 kIsVolatile_SerializationShift = 25, // requires 1 bit | 929 kIsVolatile_SerializationShift = 25, // requires 1 bit |
928 // 1 free bit at 24 | 930 // 1 free bit at 24 |
929 kConvexity_SerializationShift = 16, // requires 8 bits | 931 kConvexity_SerializationShift = 16, // requires 8 bits |
930 kFillType_SerializationShift = 8, // requires 8 bits | 932 kFillType_SerializationShift = 8, // requires 8 bits |
931 // low-8-bits are version | 933 // low-8-bits are version |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 void setPt(int index, SkScalar x, SkScalar y); | 1003 void setPt(int index, SkScalar x, SkScalar y); |
1002 | 1004 |
1003 friend class SkAutoPathBoundsUpdate; | 1005 friend class SkAutoPathBoundsUpdate; |
1004 friend class SkAutoDisableOvalCheck; | 1006 friend class SkAutoDisableOvalCheck; |
1005 friend class SkAutoDisableDirectionCheck; | 1007 friend class SkAutoDisableDirectionCheck; |
1006 friend class SkBench_AddPathTest; // perf test reversePathTo | 1008 friend class SkBench_AddPathTest; // perf test reversePathTo |
1007 friend class PathTest_Private; // unit test reversePathTo | 1009 friend class PathTest_Private; // unit test reversePathTo |
1008 }; | 1010 }; |
1009 | 1011 |
1010 #endif | 1012 #endif |
OLD | NEW |