| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 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 #ifndef SkPathRef_DEFINED | 9 #ifndef SkPathRef_DEFINED |
| 10 #define SkPathRef_DEFINED | 10 #define SkPathRef_DEFINED |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 * | 137 * |
| 138 * @param rect returns the bounding rect of this oval. It's a circle | 138 * @param rect returns the bounding rect of this oval. It's a circle |
| 139 * if the height and width are the same. | 139 * if the height and width are the same. |
| 140 * | 140 * |
| 141 * @return true if this path is an oval. | 141 * @return true if this path is an oval. |
| 142 * Tracking whether a path is an oval is considered an | 142 * Tracking whether a path is an oval is considered an |
| 143 * optimization for performance and so some paths that are in | 143 * optimization for performance and so some paths that are in |
| 144 * fact ovals can report false. | 144 * fact ovals can report false. |
| 145 */ | 145 */ |
| 146 bool isOval(SkRect* rect) const { | 146 bool isOval(SkRect* rect) const { |
| 147 if (fIsOval && NULL != rect) { | 147 if (fIsOval && rect) { |
| 148 *rect = getBounds(); | 148 *rect = getBounds(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 return SkToBool(fIsOval); | 151 return SkToBool(fIsOval); |
| 152 } | 152 } |
| 153 | 153 |
| 154 bool hasComputedBounds() const { | 154 bool hasComputedBounds() const { |
| 155 return !fBoundsIsDirty; | 155 return !fBoundsIsDirty; |
| 156 } | 156 } |
| 157 | 157 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. | 453 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. |
| 454 }; | 454 }; |
| 455 mutable uint32_t fGenerationID; | 455 mutable uint32_t fGenerationID; |
| 456 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. | 456 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. |
| 457 | 457 |
| 458 friend class PathRefTest_Private; | 458 friend class PathRefTest_Private; |
| 459 typedef SkRefCnt INHERITED; | 459 typedef SkRefCnt INHERITED; |
| 460 }; | 460 }; |
| 461 | 461 |
| 462 #endif | 462 #endif |
| OLD | NEW |