| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 /** Is this style a fill with no path effect? */ | 110 /** Is this style a fill with no path effect? */ |
| 111 bool isSimpleFill() const { return fStrokeRec.isFillStyle() && !fPathEffect;
} | 111 bool isSimpleFill() const { return fStrokeRec.isFillStyle() && !fPathEffect;
} |
| 112 | 112 |
| 113 /** Is this style a hairline with no path effect? */ | 113 /** Is this style a hairline with no path effect? */ |
| 114 bool isSimpleHairline() const { return fStrokeRec.isHairlineStyle() && !fPat
hEffect; } | 114 bool isSimpleHairline() const { return fStrokeRec.isHairlineStyle() && !fPat
hEffect; } |
| 115 | 115 |
| 116 SkPathEffect* pathEffect() const { return fPathEffect.get(); } | 116 SkPathEffect* pathEffect() const { return fPathEffect.get(); } |
| 117 | 117 |
| 118 bool hasPathEffect() const { return SkToBool(fPathEffect.get()); } |
| 119 |
| 118 bool hasNonDashPathEffect() const { return fPathEffect.get() && !this->isDas
hed(); } | 120 bool hasNonDashPathEffect() const { return fPathEffect.get() && !this->isDas
hed(); } |
| 119 | 121 |
| 120 bool isDashed() const { return SkPathEffect::kDash_DashType == fDashInfo.fTy
pe; } | 122 bool isDashed() const { return SkPathEffect::kDash_DashType == fDashInfo.fTy
pe; } |
| 121 SkScalar dashPhase() const { | 123 SkScalar dashPhase() const { |
| 122 SkASSERT(this->isDashed()); | 124 SkASSERT(this->isDashed()); |
| 123 return fDashInfo.fPhase; | 125 return fDashInfo.fPhase; |
| 124 } | 126 } |
| 125 int dashIntervalCnt() const { | 127 int dashIntervalCnt() const { |
| 126 SkASSERT(this->isDashed()); | 128 SkASSERT(this->isDashed()); |
| 127 return fDashInfo.fIntervals.count(); | 129 return fDashInfo.fIntervals.count(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 SkScalar fPhase; | 200 SkScalar fPhase; |
| 199 SkAutoSTArray<4, SkScalar> fIntervals; | 201 SkAutoSTArray<4, SkScalar> fIntervals; |
| 200 }; | 202 }; |
| 201 | 203 |
| 202 SkStrokeRec fStrokeRec; | 204 SkStrokeRec fStrokeRec; |
| 203 sk_sp<SkPathEffect> fPathEffect; | 205 sk_sp<SkPathEffect> fPathEffect; |
| 204 DashInfo fDashInfo; | 206 DashInfo fDashInfo; |
| 205 }; | 207 }; |
| 206 | 208 |
| 207 #endif | 209 #endif |
| OLD | NEW |