diff options
author | ethannicholas <ethannicholas@google.com> | 2016-02-22 07:42:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-22 07:42:18 -0800 |
commit | 23e7af0e8ab8377b28e1399b4950def672284724 (patch) | |
tree | cbee927515891c54d1b9f5a4504cf8abddf17ce9 /include/effects | |
parent | b6ce10a235f2b692fdc014521c4a1ecbe98a00ef (diff) |
Revert of fix misc asserts and checks found by fuzzer (patchset #1 id:1 of https://codereview.chromium.org/1719913002/ )
Reason for revert:
Looks to be causing failures in LayerTreeHostFilters* tests (https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/177297/steps/cc_unittests%20%28with%20patch%29/logs/stdio).
Original issue's description:
> fix misc asserts and checks found by fuzzer
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/653db51b440491b0fb1908bf5a43dcc89c90044d
TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1721743002
Diffstat (limited to 'include/effects')
-rw-r--r-- | include/effects/Sk1DPathEffect.h | 6 | ||||
-rw-r--r-- | include/effects/SkDashPathEffect.h | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/include/effects/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h index c8328881a0..3419dc23b7 100644 --- a/include/effects/Sk1DPathEffect.h +++ b/include/effects/Sk1DPathEffect.h @@ -45,6 +45,8 @@ public: kTranslate_Style, // translate the shape to each position kRotate_Style, // rotate the shape about its center kMorph_Style, // transform each point, and turn lines into curves + + kStyleCount }; /** Dash by replicating the specified path. @@ -54,7 +56,9 @@ public: @param style how to transform path at each point (based on the current position and tangent) */ - static SkPathEffect* Create(const SkPath& path, SkScalar advance, SkScalar phase, Style); + static SkPathEffect* Create(const SkPath& path, SkScalar advance, SkScalar phase, Style style) { + return new SkPath1DPathEffect(path, advance, phase, style); + } virtual bool filterPath(SkPath*, const SkPath&, SkStrokeRec*, const SkRect*) const override; diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index 08b0a4693f..3c1407b725 100644 --- a/include/effects/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h @@ -36,7 +36,10 @@ public: Note: only affects stroked paths. */ - static SkPathEffect* Create(const SkScalar intervals[], int count, SkScalar phase); + static SkPathEffect* Create(const SkScalar intervals[], int count, SkScalar phase) { + return new SkDashPathEffect(intervals, count, phase); + } + virtual ~SkDashPathEffect(); virtual bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override; @@ -55,7 +58,6 @@ public: #endif protected: - virtual ~SkDashPathEffect(); SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); void flatten(SkWriteBuffer&) const override; @@ -64,7 +66,6 @@ private: int32_t fCount; SkScalar fPhase; // computed from phase - SkScalar fInitialDashLength; int32_t fInitialDashIndex; SkScalar fIntervalLength; |