[PATCH 5/8] d2d1: Refactor outline generation as preparation for new TYPE_END vertex

Henri Verbeet hverbeet at gmail.com
Fri Jan 7 12:40:14 CST 2022


On Fri, 7 Jan 2022 at 19:33, Stefan Brüns <stefan.bruens at rwth-aachen.de> wrote:
> Or they are coincident, the figure is CLOSED, thus vertex_count is
> decremented. Then the last segment starts a `i == vertex_count - 1 ==
> real_vertex_count - 2`. As `vertex[i + 1] == vertex[0]` holds, we can ignore
> the wraparound.
>
> The comment is slightly off in this case - maybe `i + 1 < real_vertex_count`,
> but I am not sure this is really relevant, as this becomes fully correct with
> patch 6.
>
Ah, right, this is relying on the last vertex still being available,
even though we decremented the vertex count in
d2d_geometry_sink_EndFigure(). That would normally be a little too
subtle/fragile for our taste, but as patch 6 makes it more obviously
correct, it's probably fine.



More information about the wine-devel mailing list