skia2/modules/pathkit/tests
Kevin Lubick 67c905ce6b Fixing a bug in SkOpEdgeBuilder::walk that causes pathOps to fail when cubic segment is reducable
Inside SkOpEdgeBuilder::walk(), when current segment is cubic curve, its shape may be reduced, therefore, the curve points should be determined by the reduction result ‘split->fVerb’ instead of ‘verb’.

Actually, inside this switch case, ‘verb’ is always ‘SkPath::kCubic_Verb’, which makes the ‘fCanAdd’ always true. The outcome of this bug makes the subsequent logic which depends on ‘fCanAdd’ (L301-332) incorrect, and in some cases, fails the whole boolean operation at L329.

The Fiddle below demonstrates how this bug fails a union operation of two paths, by returning an empty path.
https://fiddle.skia.org/c/e528567b62bc338cd99f4a89f0c5342e

Screen shot of the fiddle:
https://www.dropbox.com/s/4bnzlponq6gen27/pathOpsBug.png?dl=0

2nd Fiddle drawing the results (larger)
https://fiddle.skia.org/c/1f2a513c2ee0395b9d05fb1eb987b01f

Change-Id: If07f54cef1b9409f9b6db27d6294a3e3461b0181
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284426
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-04-21 16:56:54 +00:00
..
effects.spec.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00
path2d.spec.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00
path.spec.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00
pathkitinit.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00
pathops.spec.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00
PathOpsOp.json [PathKit] Move from experimental to modules 2018-08-31 14:18:16 +00:00
PathOpsSimplify.json Fixing a bug in SkOpEdgeBuilder::walk that causes pathOps to fail when cubic segment is reducable 2020-04-21 16:56:54 +00:00
svg.spec.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00
testReporter.js [canvaskit] Expand canvas2d API 2018-11-20 18:39:43 +00:00
util.spec.js [pathkit] Clean up perf/test init 2019-03-12 13:46:41 +00:00