aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xps/SkXPSDevice.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-06 07:22:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-06 07:22:58 -0700
commit055e192adc0072ae2548ef5431ceee652945f9c2 (patch)
treeeaced153f10fe492e99302404c5b1b96d6b796e4 /src/xps/SkXPSDevice.cpp
parentad3a5c634d6d96874a8b5f13e96d05d62fd0d35d (diff)
Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask
Diffstat (limited to 'src/xps/SkXPSDevice.cpp')
-rw-r--r--src/xps/SkXPSDevice.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp
index 90fc68091c..aef9dc8baf 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;