Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: src/gpu/GrStyle.cpp

Issue 2099313002: Make sure path computed from stroke-rec application using GrStyle is volatile. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698