path hang
authorCary Clark <caryclark@skia.org>
Tue, 21 Mar 2017 20:11:54 +0000 (16:11 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 22 Mar 2017 16:32:45 +0000 (16:32 +0000)
commit44c1b111c7528cdbcfbd76989e0701ce9bbddf58
tree15fc5af201b5a442e052e2235735cc334a0c42c1
parentde1a60534648ca8a6eb3ae32e06a7a9e9c0591f3
path hang

In release, path hangs because buffers overflow.
Debug shows that the clipped cubic generates 34 points although
a maximum of 32 are expected.

The path has very small numbers that fool MaxCurvature into
thinking that there are more places to break the cubic than
are necessary.

To make this bullet-proof, increase the verbs and points.

Allow (1 line + 1 cubic) * (3 x-pieces) * (3 y-pieces) == 18 verbs.
Allow (6 points for line + cubic + line) * 9 pieces    == 54 points.

R=reed@google.com,liyuqian@google.com
BUG=698714

Change-Id: I04fad10c151c79d0c53465a2b658aa4dd59f1c98
Reviewed-on: https://skia-review.googlesource.com/9983
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
src/core/SkEdgeClipper.h
tests/ClipCubicTest.cpp