| 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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 kDirection_SerializationShift = 26, // requires 2 bits | 955 kDirection_SerializationShift = 26, // requires 2 bits |
| 956 kUnused2_SerializationShift = 25, // 1 free bit | 956 kUnused2_SerializationShift = 25, // 1 free bit |
| 957 // 1 free bit at 24 | 957 // 1 free bit at 24 |
| 958 kConvexity_SerializationShift = 16, // requires 8 bits | 958 kConvexity_SerializationShift = 16, // requires 8 bits |
| 959 kFillType_SerializationShift = 8, // requires 8 bits | 959 kFillType_SerializationShift = 8, // requires 8 bits |
| 960 // 8 free bits at 0 | 960 // 8 free bits at 0 |
| 961 }; | 961 }; |
| 962 | 962 |
| 963 SkAutoTUnref<SkPathRef> fPathRef; | 963 SkAutoTUnref<SkPathRef> fPathRef; |
| 964 | 964 |
| 965 int fLastMoveToIndex; | |
| 966 uint8_t fFillType; | 965 uint8_t fFillType; |
| 967 mutable uint8_t fConvexity; | 966 mutable uint8_t fConvexity; |
| 968 mutable uint8_t fDirection; | 967 mutable uint8_t fDirection; |
| 969 #ifdef SK_BUILD_FOR_ANDROID | 968 #ifdef SK_BUILD_FOR_ANDROID |
| 970 const SkPath* fSourcePath; | 969 const SkPath* fSourcePath; |
| 971 #endif | 970 #endif |
| 972 | 971 |
| 973 /** Resets all fields other than fPathRef to their initial 'empty' values. | 972 /** Resets all fields other than fPathRef to their initial 'empty' values. |
| 974 * Assumes the caller has already emptied fPathRef. | 973 * Assumes the caller has already emptied fPathRef. |
| 975 * On Android increments fGenerationID without reseting it. | 974 * On Android increments fGenerationID without reseting it. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 991 first point is automatically set to (0,0). | 990 first point is automatically set to (0,0). |
| 992 */ | 991 */ |
| 993 void reversePathTo(const SkPath&); | 992 void reversePathTo(const SkPath&); |
| 994 | 993 |
| 995 // called before we add points for lineTo, quadTo, cubicTo, checking to see | 994 // called before we add points for lineTo, quadTo, cubicTo, checking to see |
| 996 // if we need to inject a leading moveTo first | 995 // if we need to inject a leading moveTo first |
| 997 // | 996 // |
| 998 // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) | 997 // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) |
| 999 // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(previou
s moveTo) | 998 // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(previou
s moveTo) |
| 1000 // | 999 // |
| 1001 inline void injectMoveToIfNeeded(); | 1000 void injectMoveToIfNeeded() { |
| 1001 SkPathRef::Editor ed(&fPathRef); |
| 1002 ed.injectMoveToIfNeeded(); |
| 1003 } |
| 1002 | 1004 |
| 1003 inline bool hasOnlyMoveTos() const; | 1005 inline bool hasOnlyMoveTos() const; |
| 1004 | 1006 |
| 1005 Convexity internalGetConvexity() const; | 1007 Convexity internalGetConvexity() const; |
| 1006 | 1008 |
| 1007 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, | 1009 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, |
| 1008 bool* isClosed, Direction* direction) const; | 1010 bool* isClosed, Direction* direction) const; |
| 1009 | 1011 |
| 1010 /** Returns if the path can return a bound at no cost (true) or will have to | 1012 /** Returns if the path can return a bound at no cost (true) or will have to |
| 1011 perform some computation (false). | 1013 perform some computation (false). |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1024 } | 1026 } |
| 1025 | 1027 |
| 1026 friend class SkAutoPathBoundsUpdate; | 1028 friend class SkAutoPathBoundsUpdate; |
| 1027 friend class SkAutoDisableOvalCheck; | 1029 friend class SkAutoDisableOvalCheck; |
| 1028 friend class SkAutoDisableDirectionCheck; | 1030 friend class SkAutoDisableDirectionCheck; |
| 1029 friend class SkBench_AddPathTest; // perf test reversePathTo | 1031 friend class SkBench_AddPathTest; // perf test reversePathTo |
| 1030 friend class PathTest_Private; // unit test reversePathTo | 1032 friend class PathTest_Private; // unit test reversePathTo |
| 1031 }; | 1033 }; |
| 1032 | 1034 |
| 1033 #endif | 1035 #endif |
| OLD | NEW |