OLD | NEW |
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 Loading... |
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 // comment out the line below to determine if it is the reason that the chro
me mac perf bot |
| 291 // has begun crashing |
| 292 // strokeInfo.setResScale(SkDraw::ComputeResScaleForStroking(origViewMatrix)
); |
291 | 293 |
292 // If we have a prematrix, apply it to the path, optimizing for the case | 294 // If we have a prematrix, apply it to the path, optimizing for the case |
293 // where the original path can in fact be modified in place (even though | 295 // where the original path can in fact be modified in place (even though |
294 // its parameter type is const). | 296 // its parameter type is const). |
295 SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath); | 297 SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath); |
296 SkTLazy<SkPath> tmpPath; | 298 SkTLazy<SkPath> tmpPath; |
297 SkTLazy<SkPath> effectPath; | 299 SkTLazy<SkPath> effectPath; |
298 SkPathEffect* pathEffect = paint.getPathEffect(); | 300 SkPathEffect* pathEffect = paint.getPathEffect(); |
299 | 301 |
300 SkMatrix viewMatrix = origViewMatrix; | 302 SkMatrix viewMatrix = origViewMatrix; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 341 |
340 if (paint.getMaskFilter()) { | 342 if (paint.getMaskFilter()) { |
341 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, | 343 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, |
342 paint.getMaskFilter(), pathEffect, strokeInfo
, | 344 paint.getMaskFilter(), pathEffect, strokeInfo
, |
343 pathPtr, pathIsMutable); | 345 pathPtr, pathIsMutable); |
344 } else { | 346 } else { |
345 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); | 347 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); |
346 } | 348 } |
347 } | 349 } |
348 | 350 |
OLD | NEW |