diff options
author | 2016-05-06 07:22:58 -0700 | |
---|---|---|
committer | 2016-05-06 07:22:58 -0700 | |
commit | 055e192adc0072ae2548ef5431ceee652945f9c2 (patch) | |
tree | eaced153f10fe492e99302404c5b1b96d6b796e4 /src/xps/SkXPSDevice.cpp | |
parent | ad3a5c634d6d96874a8b5f13e96d05d62fd0d35d (diff) |
Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955633002
Review-Url: https://codereview.chromium.org/1955633002
Diffstat (limited to 'src/xps/SkXPSDevice.cpp')
-rw-r--r-- | src/xps/SkXPSDevice.cpp | 7 |
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; |