| 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 #include "GrStyle.h" | 8 #include "GrStyle.h" |
| 9 #include "SkDashPathPriv.h" | 9 #include "SkDashPathPriv.h" |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 const SkPath* pathForStrokeRec = &src; | 171 const SkPath* pathForStrokeRec = &src; |
| 172 if (this->applyPathEffect(dst, &strokeRec, src)) { | 172 if (this->applyPathEffect(dst, &strokeRec, src)) { |
| 173 pathForStrokeRec = dst; | 173 pathForStrokeRec = dst; |
| 174 } else if (fPathEffect) { | 174 } else if (fPathEffect) { |
| 175 return false; | 175 return false; |
| 176 } | 176 } |
| 177 if (strokeRec.needToApply()) { | 177 if (strokeRec.needToApply()) { |
| 178 if (!strokeRec.applyToPath(dst, *pathForStrokeRec)) { | 178 if (!strokeRec.applyToPath(dst, *pathForStrokeRec)) { |
| 179 return false; | 179 return false; |
| 180 } | 180 } |
| 181 dst->setIsVolatile(true); |
| 181 *style = SkStrokeRec::kFill_InitStyle; | 182 *style = SkStrokeRec::kFill_InitStyle; |
| 182 } else if (!fPathEffect) { | 183 } else if (!fPathEffect) { |
| 183 // Nothing to do for path effect or stroke, fail. | 184 // Nothing to do for path effect or stroke, fail. |
| 184 return false; | 185 return false; |
| 185 } else { | 186 } else { |
| 186 SkASSERT(SkStrokeRec::kFill_Style == strokeRec.getStyle() || | 187 SkASSERT(SkStrokeRec::kFill_Style == strokeRec.getStyle() || |
| 187 SkStrokeRec::kHairline_Style == strokeRec.getStyle()); | 188 SkStrokeRec::kHairline_Style == strokeRec.getStyle()); |
| 188 *style = strokeRec.getStyle() == SkStrokeRec::kFill_Style | 189 *style = strokeRec.getStyle() == SkStrokeRec::kFill_Style |
| 189 ? SkStrokeRec::kFill_InitStyle | 190 ? SkStrokeRec::kFill_InitStyle |
| 190 : SkStrokeRec::kHairline_InitStyle; | 191 : SkStrokeRec::kHairline_InitStyle; |
| 191 } | 192 } |
| 192 return true; | 193 return true; |
| 193 } | 194 } |
| OLD | NEW |