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

Unified Diff: src/xps/SkXPSDevice.cpp

Issue 1955633002: Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix xps change Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/xps/SkXPSDevice.cpp
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp
index 90fc68091cb0bc5283cbb0d720fee0baa54d5698..aef9dc8baf8659b751c966becb167a9ccd3adcda 100644
--- a/src/xps/SkXPSDevice.cpp
+++ b/src/xps/SkXPSDevice.cpp
@@ -1657,6 +1657,11 @@ void SkXPSDevice::drawPath(const SkDraw& d,
SkMask* mask = nullptr;
+ SkASSERT(SkPaint::kFill_Style == paint->getStyle() ||
+ (SkPaint::kStroke_Style == paint->getStyle() && 0 == paint->getStrokeWidth()));
+ SkStrokeRec::InitStyle style = (SkPaint::kFill_Style == paint->getStyle())
+ ? SkStrokeRec::kFill_InitStyle
+ : SkStrokeRec::kHairline_InitStyle;
//[Pixel-path -> Mask]
SkMask rasteredMask;
if (SkDraw::DrawToMask(
@@ -1666,7 +1671,7 @@ void SkXPSDevice::drawPath(const SkDraw& d,
&matrix,
&rasteredMask,
SkMask::kComputeBoundsAndRenderImage_CreateMode,
- paint->getStyle())) {
+ style)) {
SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage);
mask = &rasteredMask;
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698