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

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

Issue 2055253002: Add control over whether lines are special cased in SkDashPath. Disable when called from GrShape. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: update comments Created 4 years, 6 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 | « src/gpu/GrShape.h ('k') | src/gpu/GrStyle.h » ('j') | 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 "GrShape.h" 8 #include "GrShape.h"
9 9
10 GrShape& GrShape::operator=(const GrShape& that) { 10 GrShape& GrShape::operator=(const GrShape& that) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 SkPath* srcForPathEffect; 204 SkPath* srcForPathEffect;
205 if (parent.fType == Type::kPath) { 205 if (parent.fType == Type::kPath) {
206 srcForPathEffect = parent.fPath.get(); 206 srcForPathEffect = parent.fPath.get();
207 } else { 207 } else {
208 srcForPathEffect = tmpPath.init(); 208 srcForPathEffect = tmpPath.init();
209 parent.asPath(tmpPath.get()); 209 parent.asPath(tmpPath.get());
210 } 210 }
211 // Should we consider bounds? Would have to include in key, but it'd be nice to know 211 // Should we consider bounds? Would have to include in key, but it'd be nice to know
212 // if the bounds actually modified anything before including in key. 212 // if the bounds actually modified anything before including in key.
213 SkStrokeRec strokeRec = parent.fStyle.strokeRec(); 213 SkStrokeRec strokeRec = parent.fStyle.strokeRec();
214 strokeRec.setResScale(scale); 214 if (!parent.fStyle.applyPathEffectToPath(fPath.get(), &strokeRec, *srcFo rPathEffect,
215 if (!pe->filterPath(fPath.get(), *srcForPathEffect, &strokeRec, nullptr) ) { 215 scale)) {
216 // If the path effect fails then we continue as though there was no path effect. 216 // If the path effect fails then we continue as though there was no path effect.
217 // If the original was a rrect that we couldn't canonicalize because of the path 217 // If the original was a rrect that we couldn't canonicalize because of the path
218 // effect, then do so now. 218 // effect, then do so now.
219 if (parent.fType == Type::kRRect && (parent.fRRectDir != kDefaultRRe ctDir || 219 if (parent.fType == Type::kRRect && (parent.fRRectDir != kDefaultRRe ctDir ||
220 parent.fRRectStart != kDefaultR RectStart)) { 220 parent.fRRectStart != kDefaultR RectStart)) {
221 SkASSERT(srcForPathEffect == tmpPath.get()); 221 SkASSERT(srcForPathEffect == tmpPath.get());
222 tmpPath.get()->reset(); 222 tmpPath.get()->reset();
223 tmpPath.get()->addRRect(parent.fRRect, kDefaultRRectDir, kDefaul tRRectDir); 223 tmpPath.get()->addRRect(parent.fRRect, kDefaultRRectDir, kDefaul tRRectDir);
224 } 224 }
225 *fPath.get() = *srcForPathEffect; 225 *fPath.get() = *srcForPathEffect;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // Since there is no path effect the dir and start index is imma terial. 349 // Since there is no path effect the dir and start index is imma terial.
350 *rrectDir = kDefaultRRectDir; 350 *rrectDir = kDefaultRRectDir;
351 *rrectStart = kDefaultRRectStart; 351 *rrectStart = kDefaultRRectStart;
352 *rrectIsInverted = rrect_path_is_inverse_filled(path, strokeRec, pe); 352 *rrectIsInverted = rrect_path_is_inverse_filled(path, strokeRec, pe);
353 return Type::kRRect; 353 return Type::kRRect;
354 } 354 }
355 } 355 }
356 } 356 }
357 return Type::kPath; 357 return Type::kPath;
358 } 358 }
OLDNEW
« no previous file with comments | « src/gpu/GrShape.h ('k') | src/gpu/GrStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698