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

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

Issue 1608353002: resolution dependent path measure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 4 years, 11 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/core/SkPathMeasure.cpp ('k') | src/utils/SkDashPath.cpp » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrBlurUtils.h" 8 #include "GrBlurUtils.h"
9 #include "GrDrawContext.h" 9 #include "GrDrawContext.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 const GrClip& clip, 280 const GrClip& clip,
281 const SkPath& origSrcPath, 281 const SkPath& origSrcPath,
282 const SkPaint& paint, 282 const SkPaint& paint,
283 const SkMatrix& origViewMatrix, 283 const SkMatrix& origViewMatrix,
284 const SkMatrix* prePathMatrix, 284 const SkMatrix* prePathMatrix,
285 const SkIRect& clipBounds, 285 const SkIRect& clipBounds,
286 bool pathIsMutable) { 286 bool pathIsMutable) {
287 SkASSERT(!pathIsMutable || origSrcPath.isVolatile()); 287 SkASSERT(!pathIsMutable || origSrcPath.isVolatile());
288 288
289 GrStrokeInfo strokeInfo(paint); 289 GrStrokeInfo strokeInfo(paint);
290 strokeInfo.setResScale(SkDraw::ComputeResScaleForStroking(origViewMatrix));
290 291
291 // If we have a prematrix, apply it to the path, optimizing for the case 292 // If we have a prematrix, apply it to the path, optimizing for the case
292 // where the original path can in fact be modified in place (even though 293 // where the original path can in fact be modified in place (even though
293 // its parameter type is const). 294 // its parameter type is const).
294 SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath); 295 SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath);
295 SkTLazy<SkPath> tmpPath; 296 SkTLazy<SkPath> tmpPath;
296 SkTLazy<SkPath> effectPath; 297 SkTLazy<SkPath> effectPath;
297 SkPathEffect* pathEffect = paint.getPathEffect(); 298 SkPathEffect* pathEffect = paint.getPathEffect();
298 299
299 SkMatrix viewMatrix = origViewMatrix; 300 SkMatrix viewMatrix = origViewMatrix;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 339
339 if (paint.getMaskFilter()) { 340 if (paint.getMaskFilter()) {
340 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix, 341 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix,
341 paint.getMaskFilter(), pathEffect, strokeInfo , 342 paint.getMaskFilter(), pathEffect, strokeInfo ,
342 pathPtr, pathIsMutable); 343 pathPtr, pathIsMutable);
343 } else { 344 } else {
344 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); 345 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo);
345 } 346 }
346 } 347 }
347 348
OLDNEW
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | src/utils/SkDashPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698