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 GrStyle_DEFINED | 8 #ifndef GrStyle_DEFINED |
9 #define GrStyle_DEFINED | 9 #define GrStyle_DEFINED |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 kPathEffectOnly, | 44 kPathEffectOnly, |
45 kPathEffectAndStrokeRec | 45 kPathEffectAndStrokeRec |
46 }; | 46 }; |
47 | 47 |
48 /** | 48 /** |
49 * Optional flags for computing keys that may remove unnecessary variation i
n the key due to | 49 * Optional flags for computing keys that may remove unnecessary variation i
n the key due to |
50 * style settings that don't affect particular classes of geometry. | 50 * style settings that don't affect particular classes of geometry. |
51 */ | 51 */ |
52 enum KeyFlags { | 52 enum KeyFlags { |
53 // The shape being styled has no open contours. | 53 // The shape being styled has no open contours. |
54 kClosed_KeyFlag = 0x1 | 54 kClosed_KeyFlag = 0x1, |
| 55 // The shape being styled doesn't have any joins and so isn't affected b
y join type. |
| 56 kNoJoins_KeyFlag = 0x2 |
55 }; | 57 }; |
56 | 58 |
57 /** | 59 /** |
58 * Computes the key length for a GrStyle. The return will be negative if it
cannot be turned | 60 * Computes the key length for a GrStyle. The return will be negative if it
cannot be turned |
59 * into a key. This occurs when there is a path effect that is not a dash. T
he key can | 61 * into a key. This occurs when there is a path effect that is not a dash. T
he key can |
60 * either reflect just the path effect (if one) or the path effect and the s
trokerec. Note | 62 * either reflect just the path effect (if one) or the path effect and the s
trokerec. Note |
61 * that a simple fill has a zero sized key. | 63 * that a simple fill has a zero sized key. |
62 */ | 64 */ |
63 static int KeySize(const GrStyle&, Apply, uint32_t flags = 0); | 65 static int KeySize(const GrStyle&, Apply, uint32_t flags = 0); |
64 | 66 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 }; | 204 }; |
203 | 205 |
204 bool applyPathEffect(SkPath* dst, SkStrokeRec* strokeRec, const SkPath& src)
const; | 206 bool applyPathEffect(SkPath* dst, SkStrokeRec* strokeRec, const SkPath& src)
const; |
205 | 207 |
206 SkStrokeRec fStrokeRec; | 208 SkStrokeRec fStrokeRec; |
207 sk_sp<SkPathEffect> fPathEffect; | 209 sk_sp<SkPathEffect> fPathEffect; |
208 DashInfo fDashInfo; | 210 DashInfo fDashInfo; |
209 }; | 211 }; |
210 | 212 |
211 #endif | 213 #endif |
OLD | NEW |