fuzzer fixes
authorcaryclark <caryclark@google.com>
Wed, 25 Feb 2015 17:04:04 +0000 (09:04 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 25 Feb 2015 17:04:04 +0000 (09:04 -0800)
commit63c684a8a609d39da11b4a656223cebf52ca85dc
treed29415e15295a6384ece7cfdf601062871def428
parent4e4e8160459f68c1795f2297bcec6f7866e01fa8
fuzzer fixes

Fix path bugs exposed by the path fuzzer.

Changes to existing gm and samplecode files defer their calls to construct
SkPath objects until the first draw instead of at test initialization.

Add an experimental call to SkPath to validate the internal SkPathRef.

Fix SkPath::addPoly to set the last moveto after adding a close verb.

Fix stroke to handle failures when computing the unit normal.

Add a unit test for the unit normal failure.

R=reed@google.com

Review URL: https://codereview.chromium.org/953383002
19 files changed:
gm/bitmapshader.cpp
gm/circularclips.cpp
gm/complexclip2.cpp
gm/picture.cpp
gm/pictureshader.cpp
gm/shadows.cpp
gm/simpleaaclip.cpp
gm/strokes.cpp
gyp/SampleApp.gyp
include/core/SkPath.h
samplecode/SampleApp.cpp
samplecode/SampleCode.h
samplecode/SamplePathEffects.cpp
samplecode/SamplePathFuzz.cpp [new file with mode: 0644]
samplecode/SampleStrokePath.cpp
samplecode/SampleTextOnPath.cpp
src/core/SkPath.cpp
src/core/SkStroke.cpp
tests/StrokeTest.cpp