[PATCH v2 0/8] Fix infinite loop for END_OPEN figures with coincident last/first vertex

Stefan Brüns stefan.bruens at rwth-aachen.de
Fri Jan 7 14:43:55 CST 2022


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.

---
v2:
  Patch 2: Update reference to Windows CI output, add some slack for
    minor rendering differences between Wine and Windows
  Patch 4: Remove leftover debug trace, add some tolerance for
    GetBounds on bezier segment
  Patch 6: Remove a spurious whitespace change

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 | 170 ++++++++++++++++++++++++++++++--
 2 files changed, 242 insertions(+), 143 deletions(-)

-- 
2.34.1




More information about the wine-devel mailing list