diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-24 20:32:22 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-24 20:32:22 +0000 |
commit | d3521f1a8dc07fe84d6a8f2151b0c176ff1ec8ca (patch) | |
tree | 7f04020f99f01833c1d8e63b910c8490b0ae0e34 /src/effects | |
parent | 9797272edfc73f18b4807751377518317991b880 (diff) |
revert 4046 -- GM:pathfill failed on one bot, maybe uninitialized memory somewhere?
git-svn-id: http://skia.googlecode.com/svn/trunk@4047 2bbb7eff-a529-9590-31e7-b0007b416f81
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 10a9a8434b..09e8d135b6 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, SkStrokeRec*) { +bool Sk1DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkScalar* width) { 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, - SkStrokeRec* rec) { + SkScalar* width) { if (fAdvance > 0) { - rec->setFillStyle(); - return this->INHERITED::filterPath(dst, src, rec); + *width = -1; + return this->INHERITED::filterPath(dst, src, width); } return false; } diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 3f8c998651..8693157f16 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, SkStrokeRec*) { +bool Sk2DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkScalar* width) { if (!fMatrixIsInvertible) { return false; } diff --git a/src/effects/SkCornerPathEffect.cpp b/src/effects/SkCornerPathEffect.cpp index 749384d579..474623175b 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, - SkStrokeRec*) { + SkScalar* width) { if (fRadius == 0) { return false; } diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index 13c19afab4..0cc97b6b15 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, - SkStrokeRec* rec) { + SkScalar* width) { // we do nothing if the src wants to be filled, or if our dashlength is 0 - if (rec->isFillStyle() || fInitialDashLength < 0) { + if (*width < 0 || fInitialDashLength < 0) { return false; } diff --git a/src/effects/SkDiscretePathEffect.cpp b/src/effects/SkDiscretePathEffect.cpp index 0536e5646d..06b9d19c68 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, - SkStrokeRec* rec) { - bool doFill = rec->isFillStyle(); + SkScalar* width) { + bool doFill = *width < 0; SkPathMeasure meas(src, doFill); uint32_t seed = SkScalarRound(meas.getLength()); |