| 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 20 matching lines...) Expand all Loading... |
| 31 * style to the geometry. The idea is to expand this to cover most or all of the
geometries that | 31 * style to the geometry. The idea is to expand this to cover most or all of the
geometries that |
| 32 * have SkCanvas::draw APIs. | 32 * have SkCanvas::draw APIs. |
| 33 */ | 33 */ |
| 34 class GrShape { | 34 class GrShape { |
| 35 public: | 35 public: |
| 36 GrShape() : fType(Type::kEmpty) {} | 36 GrShape() : fType(Type::kEmpty) {} |
| 37 | 37 |
| 38 explicit GrShape(const SkPath& path) | 38 explicit GrShape(const SkPath& path) |
| 39 : fType(Type::kPath) | 39 : fType(Type::kPath) |
| 40 , fPath(&path) { | 40 , fPath(&path) { |
| 41 // test comment to see if it applies to chromium checkout |
| 41 this->attemptToReduceFromPath(); | 42 this->attemptToReduceFromPath(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 explicit GrShape(const SkRRect& rrect) | 45 explicit GrShape(const SkRRect& rrect) |
| 45 : fType(Type::kRRect) | 46 : fType(Type::kRRect) |
| 46 , fRRect(rrect) { | 47 , fRRect(rrect) { |
| 47 this->attemptToReduceFromRRect(); | 48 this->attemptToReduceFromRRect(); |
| 48 } | 49 } |
| 49 | 50 |
| 50 explicit GrShape(const SkRect& rect) | 51 explicit GrShape(const SkRect& rect) |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 return Type::kPath; | 232 return Type::kPath; |
| 232 } | 233 } |
| 233 | 234 |
| 234 Type fType; | 235 Type fType; |
| 235 SkRRect fRRect; | 236 SkRRect fRRect; |
| 236 SkTLazy<SkPath> fPath; | 237 SkTLazy<SkPath> fPath; |
| 237 GrStyle fStyle; | 238 GrStyle fStyle; |
| 238 SkAutoSTArray<8, uint32_t> fInheritedKey; | 239 SkAutoSTArray<8, uint32_t> fInheritedKey; |
| 239 }; | 240 }; |
| 240 #endif | 241 #endif |
| OLD | NEW |