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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 mutable uint8_t fBoundsIsDirty; | 977 mutable uint8_t fBoundsIsDirty; |
978 mutable uint8_t fConvexity; | 978 mutable uint8_t fConvexity; |
979 mutable uint8_t fDirection; | 979 mutable uint8_t fDirection; |
980 mutable SkBool8 fIsFinite; // only meaningful if bounds are valid | 980 mutable SkBool8 fIsFinite; // only meaningful if bounds are valid |
981 mutable SkBool8 fIsOval; | 981 mutable SkBool8 fIsOval; |
982 #ifdef SK_BUILD_FOR_ANDROID | 982 #ifdef SK_BUILD_FOR_ANDROID |
983 uint32_t fGenerationID; | 983 uint32_t fGenerationID; |
984 const SkPath* fSourcePath; | 984 const SkPath* fSourcePath; |
985 #endif | 985 #endif |
986 | 986 |
| 987 /** Resets all fields other than fPathRef to their initial 'empty' values. |
| 988 * Assumes the caller has already emptied fPathRef. |
| 989 * On Android increments fGenerationID without reseting it. |
| 990 */ |
| 991 void resetFields(); |
| 992 |
| 993 /** Sets all fields other than fPathRef to the values in 'that'. |
| 994 * Assumes the caller has already set fPathRef. |
| 995 * On Android increments fGenerationID without copying it. |
| 996 * On Android sets fSourcePath to NULL. |
| 997 */ |
| 998 void copyFields(const SkPath& that); |
| 999 |
987 // called, if dirty, by getBounds() | 1000 // called, if dirty, by getBounds() |
988 void computeBounds() const; | 1001 void computeBounds() const; |
989 | 1002 |
990 friend class Iter; | 1003 friend class Iter; |
991 | 1004 |
992 friend class SkPathStroker; | 1005 friend class SkPathStroker; |
993 /* Append the first contour of path, ignoring path's initial point. If no | 1006 /* Append the first contour of path, ignoring path's initial point. If no |
994 moveTo() call has been made for this contour, the first point is | 1007 moveTo() call has been made for this contour, the first point is |
995 automatically set to (0,0). | 1008 automatically set to (0,0). |
996 */ | 1009 */ |
(...skipping 20 matching lines...) Expand all Loading... |
1017 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, | 1030 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, |
1018 bool* isClosed, Direction* direction) const; | 1031 bool* isClosed, Direction* direction) const; |
1019 | 1032 |
1020 friend class SkAutoPathBoundsUpdate; | 1033 friend class SkAutoPathBoundsUpdate; |
1021 friend class SkAutoDisableOvalCheck; | 1034 friend class SkAutoDisableOvalCheck; |
1022 friend class SkAutoDisableDirectionCheck; | 1035 friend class SkAutoDisableDirectionCheck; |
1023 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo | 1036 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo |
1024 }; | 1037 }; |
1025 | 1038 |
1026 #endif | 1039 #endif |
OLD | NEW |