This is an attempt to fix https://bugs.winehq.org/show_bug.cgi?id=51139
The first two patches just increase the coverage for stroking and StrokeContains, and proved helpful during development of the actual fix.
The third patch fixes a small issue in the segment comparision helper.
The fourth patch adds the test case triggering bug 51139. As the test causes a hang, the critical part is commented out instead of using the regular wine_todo.
The fifth patch is preparative refactoring, so the bugfix itself is more self-contained.
The sixth patch is the actual fix, and patch 7 reenables the critical test case parts.
The last patch is just some minor, final cleanup.
This patch series obsoletes the previous attempt: "d2d: Suppress last empty segment also for D2D1_FIGURE_END_OPEN", which avoided the infinite loop, but also caused several regressions.
Stefan Brüns (8): d2d1/tests: Test StrokeContains when last segment is bezier and closes the path d2d1/tests: Add test for single quadratic bezier segment d2d1/tests: Avoid out-of-bounds access when comparing segments d2d1/tests: Test coincident last/first vertex for both OPEN and CLOSED d2d1: Refactor outline generation as preparation for new TYPE_END vertex d2d1: Use special vertex TYPE_END when last/first coincede d2d1/tests: Reenable tests formerly causing infinite loop d2d1: remove extraneous checks for last vertex
dlls/d2d1/geometry.c | 215 +++++++++++++++-------------------------- dlls/d2d1/tests/d2d1.c | 171 ++++++++++++++++++++++++++++++-- 2 files changed, 244 insertions(+), 142 deletions(-)