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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 if (!strokeInfo.isDashed() && pathEffect && | 329 if (!strokeInfo.isDashed() && pathEffect && |
330 pathEffect->filterPath(tmpPath2.init(), *pathPtr, &strokeInfo, nullptr))
{ | 330 pathEffect->filterPath(tmpPath2.init(), *pathPtr, &strokeInfo, nullptr))
{ |
331 pathPtr = tmpPath2.get(); | 331 pathPtr = tmpPath2.get(); |
332 pathPtr->setIsVolatile(true); | 332 pathPtr->setIsVolatile(true); |
333 pathIsMutable = true; | 333 pathIsMutable = true; |
334 pathEffect = nullptr; | 334 pathEffect = nullptr; |
335 } | 335 } |
336 | 336 |
337 GrPaint grPaint; | 337 GrPaint grPaint; |
338 if (!SkPaintToGrPaint(context, paint, viewMatrix, &grPaint)) { | 338 if (!SkPaintToGrPaint(context, paint, viewMatrix, drawContext->allowSRGBInpu
ts(), |
| 339 &grPaint)) { |
339 return; | 340 return; |
340 } | 341 } |
341 | 342 |
342 if (paint.getMaskFilter()) { | 343 if (paint.getMaskFilter()) { |
343 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, | 344 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat
rix, |
344 paint.getMaskFilter(), pathEffect, strokeInfo
, | 345 paint.getMaskFilter(), pathEffect, strokeInfo
, |
345 pathPtr, pathIsMutable); | 346 pathPtr, pathIsMutable); |
346 } else { | 347 } else { |
347 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); | 348 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); |
348 } | 349 } |
349 } | 350 } |
OLD | NEW |