diff options
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/Sk1DPathEffect.cpp | 8 | ||||
-rw-r--r-- | src/effects/Sk2DPathEffect.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkCornerPathEffect.cpp | 2 | ||||
-rw-r--r-- | src/effects/SkDashPathEffect.cpp | 4 | ||||
-rw-r--r-- | src/effects/SkDiscretePathEffect.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp index 09e8d135b6..10a9a8434b 100644 --- a/src/effects/Sk1DPathEffect.cpp +++ b/src/effects/Sk1DPathEffect.cpp @@ -10,7 +10,7 @@ #include "Sk1DPathEffect.h" #include "SkPathMeasure.h" -bool Sk1DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkScalar* width) { +bool Sk1DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*) { SkPathMeasure meas(src, false); do { SkScalar length = meas.getLength(); @@ -67,10 +67,10 @@ SkPath1DPathEffect::SkPath1DPathEffect(const SkPath& path, SkScalar advance, } bool SkPath1DPathEffect::filterPath(SkPath* dst, const SkPath& src, - SkScalar* width) { + SkStrokeRec* rec) { if (fAdvance > 0) { - *width = -1; - return this->INHERITED::filterPath(dst, src, width); + rec->setFillStyle(); + return this->INHERITED::filterPath(dst, src, rec); } return false; } diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 8693157f16..3f8c998651 100644 --- a/src/effects/Sk2DPathEffect.cpp +++ b/src/effects/Sk2DPathEffect.cpp @@ -31,7 +31,7 @@ Sk2DPathEffect::Sk2DPathEffect(const SkMatrix& mat) : fMatrix(mat) { fMatrixIsInvertible = mat.invert(&fInverse); } -bool Sk2DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkScalar* width) { +bool Sk2DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*) { if (!fMatrixIsInvertible) { return false; } diff --git a/src/effects/SkCornerPathEffect.cpp b/src/effects/SkCornerPathEffect.cpp index 474623175b..749384d579 100644 --- a/src/effects/SkCornerPathEffect.cpp +++ b/src/effects/SkCornerPathEffect.cpp @@ -36,7 +36,7 @@ static bool ComputeStep(const SkPoint& a, const SkPoint& b, SkScalar radius, } bool SkCornerPathEffect::filterPath(SkPath* dst, const SkPath& src, - SkScalar* width) { + SkStrokeRec*) { if (fRadius == 0) { return false; } diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index 0cc97b6b15..13c19afab4 100644 --- a/src/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp @@ -81,9 +81,9 @@ SkDashPathEffect::~SkDashPathEffect() { } bool SkDashPathEffect::filterPath(SkPath* dst, const SkPath& src, - SkScalar* width) { + SkStrokeRec* rec) { // we do nothing if the src wants to be filled, or if our dashlength is 0 - if (*width < 0 || fInitialDashLength < 0) { + if (rec->isFillStyle() || fInitialDashLength < 0) { return false; } diff --git a/src/effects/SkDiscretePathEffect.cpp b/src/effects/SkDiscretePathEffect.cpp index 06b9d19c68..0536e5646d 100644 --- a/src/effects/SkDiscretePathEffect.cpp +++ b/src/effects/SkDiscretePathEffect.cpp @@ -26,8 +26,8 @@ SkDiscretePathEffect::SkDiscretePathEffect(SkScalar segLength, SkScalar deviatio } bool SkDiscretePathEffect::filterPath(SkPath* dst, const SkPath& src, - SkScalar* width) { - bool doFill = *width < 0; + SkStrokeRec* rec) { + bool doFill = rec->isFillStyle(); SkPathMeasure meas(src, doFill); uint32_t seed = SkScalarRound(meas.getLength()); |