| Index: src/core/SkDraw.cpp
|
| diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
|
| index 0cdd3a19dc0038b3d08b71211baf80ffb96ff0ed..d2c6bb131e382ede6b10841023f645d3492dc288 100644
|
| --- a/src/core/SkDraw.cpp
|
| +++ b/src/core/SkDraw.cpp
|
| @@ -992,8 +992,7 @@ void SkDraw::drawRRect(const SkRRect& rrect, const SkPaint& paint) const {
|
| SkRRect devRRect;
|
| if (rrect.transform(*fMatrix, &devRRect)) {
|
| SkAutoBlitterChoose blitter(fDst, *fMatrix, paint);
|
| - if (paint.getMaskFilter()->filterRRect(devRRect, *fMatrix, *fRC, blitter.get(),
|
| - SkPaint::kFill_Style)) {
|
| + if (paint.getMaskFilter()->filterRRect(devRRect, *fMatrix, *fRC, blitter.get())) {
|
| return; // filterRRect() called the blitter, so we're done
|
| }
|
| }
|
| @@ -1117,8 +1116,8 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint,
|
| }
|
|
|
| if (paint->getMaskFilter()) {
|
| - SkPaint::Style style = doFill ? SkPaint::kFill_Style :
|
| - SkPaint::kStroke_Style;
|
| + SkStrokeRec::InitStyle style = doFill ? SkStrokeRec::kFill_InitStyle
|
| + : SkStrokeRec::kHairline_InitStyle;
|
| if (paint->getMaskFilter()->filterPath(*devPathPtr, *fMatrix, *fRC, blitter, style)) {
|
| return; // filterPath() called the blitter, so we're done
|
| }
|
| @@ -2025,7 +2024,8 @@ static bool compute_bounds(const SkPath& devPath, const SkIRect* clipBounds,
|
| return true;
|
| }
|
|
|
| -static void draw_into_mask(const SkMask& mask, const SkPath& devPath, SkPaint::Style style) {
|
| +static void draw_into_mask(const SkMask& mask, const SkPath& devPath,
|
| + SkStrokeRec::InitStyle style) {
|
| SkDraw draw;
|
| if (!draw.fDst.reset(mask)) {
|
| return;
|
| @@ -2042,14 +2042,23 @@ static void draw_into_mask(const SkMask& mask, const SkPath& devPath, SkPaint::S
|
| draw.fRC = &clip;
|
| draw.fMatrix = &matrix;
|
| paint.setAntiAlias(true);
|
| - paint.setStyle(style);
|
| + switch (style) {
|
| + case SkStrokeRec::kHairline_InitStyle:
|
| + SkASSERT(!paint.getStrokeWidth());
|
| + paint.setStyle(SkPaint::kStroke_Style);
|
| + break;
|
| + case SkStrokeRec::kFill_InitStyle:
|
| + SkASSERT(paint.getStyle() == SkPaint::kFill_Style);
|
| + break;
|
| +
|
| + }
|
| draw.drawPath(devPath, paint);
|
| }
|
|
|
| bool SkDraw::DrawToMask(const SkPath& devPath, const SkIRect* clipBounds,
|
| const SkMaskFilter* filter, const SkMatrix* filterMatrix,
|
| SkMask* mask, SkMask::CreateMode mode,
|
| - SkPaint::Style style) {
|
| + SkStrokeRec::InitStyle style) {
|
| if (SkMask::kJustRenderImage_CreateMode != mode) {
|
| if (!compute_bounds(devPath, clipBounds, filter, filterMatrix, &mask->fBounds))
|
| return false;
|
|
|