| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 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 GrShape_DEFINED | 8 #ifndef GrShape_DEFINED |
| 9 #define GrShape_DEFINED | 9 #define GrShape_DEFINED |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 break; | 141 break; |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 /** | 145 /** |
| 146 * Returns whether the geometry is empty. Note that applying the style could
produce a | 146 * Returns whether the geometry is empty. Note that applying the style could
produce a |
| 147 * non-empty shape. | 147 * non-empty shape. |
| 148 */ | 148 */ |
| 149 bool isEmpty() const { return Type::kEmpty == fType; } | 149 bool isEmpty() const { return Type::kEmpty == fType; } |
| 150 | 150 |
| 151 /** Gets the bounds of the geometry without reflecting the shape's styling.
*/ |
| 152 const SkRect& bounds() const; |
| 153 |
| 154 /** Gets the bounds of the geometry reflecting the shape's styling. */ |
| 155 void styledBounds(SkRect* bounds) const; |
| 156 |
| 151 /** | 157 /** |
| 152 * Is it known that the unstyled geometry has no unclosed contours. This mea
ns that it will | 158 * Is it known that the unstyled geometry has no unclosed contours. This mea
ns that it will |
| 153 * not have any caps if stroked (modulo the effect of any path effect). | 159 * not have any caps if stroked (modulo the effect of any path effect). |
| 154 */ | 160 */ |
| 155 bool knownToBeClosed() const { | 161 bool knownToBeClosed() const { |
| 156 switch (fType) { | 162 switch (fType) { |
| 157 case Type::kEmpty: | 163 case Type::kEmpty: |
| 158 return true; | 164 return true; |
| 159 case Type::kRRect: | 165 case Type::kRRect: |
| 160 return true; | 166 return true; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return Type::kPath; | 242 return Type::kPath; |
| 237 } | 243 } |
| 238 | 244 |
| 239 Type fType; | 245 Type fType; |
| 240 SkRRect fRRect; | 246 SkRRect fRRect; |
| 241 SkTLazy<SkPath> fPath; | 247 SkTLazy<SkPath> fPath; |
| 242 GrStyle fStyle; | 248 GrStyle fStyle; |
| 243 SkAutoSTArray<8, uint32_t> fInheritedKey; | 249 SkAutoSTArray<8, uint32_t> fInheritedKey; |
| 244 }; | 250 }; |
| 245 #endif | 251 #endif |
| OLD | NEW |