aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/strokes.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-02-25 09:04:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-25 09:04:04 -0800
commit63c684a8a609d39da11b4a656223cebf52ca85dc (patch)
treed29415e15295a6384ece7cfdf601062871def428 /gm/strokes.cpp
parent4e4e8160459f68c1795f2297bcec6f7866e01fa8 (diff)
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
Diffstat (limited to 'gm/strokes.cpp')
-rw-r--r--gm/strokes.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index af01b9169e..cadd0d6d9e 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -80,8 +80,8 @@ private:
class Strokes2GM : public skiagm::GM {
SkPath fPath;
-public:
- Strokes2GM() {
+protected:
+ void onOnceBeforeDraw() SK_OVERRIDE {
SkRandom rand;
fPath.moveTo(0, 0);
for (int i = 0; i < 13; i++) {
@@ -91,7 +91,6 @@ public:
}
}
-protected:
SkString onShortName() SK_OVERRIDE {
return SkString("strokes_poly");