mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-14 05:10:34 +01:00
tessellator bug fix: fill-missed-stop
Fixes the regression exhibited by the test fill-missed-stop, where the tessellator would sometimes extend a trapezoid too far below the end of the right edge.
This commit is contained in:
parent
614117e487
commit
e6c8febca7
1 changed files with 7 additions and 1 deletions
|
|
@ -1064,15 +1064,21 @@ _cairo_bo_edge_end_trap (cairo_bo_edge_t *left,
|
|||
cairo_fixed_t fixed_top, fixed_bot;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_bo_trap_t *trap = left->deferred_trap;
|
||||
cairo_bo_edge_t *right;
|
||||
|
||||
if (!trap)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
/* If the right edge of the trapezoid stopped earlier than the
|
||||
* left edge, then cut the trapezoid bottom early. */
|
||||
right = trap->right;
|
||||
if (right->bottom.y < bot)
|
||||
bot = right->bottom.y;
|
||||
|
||||
fixed_top = trap->top >> CAIRO_BO_GUARD_BITS;
|
||||
fixed_bot = bot >> CAIRO_BO_GUARD_BITS;
|
||||
|
||||
if (fixed_top < fixed_bot) {
|
||||
cairo_bo_edge_t *right = trap->right;
|
||||
cairo_point_t left_top, left_bot, right_top, right_bot;
|
||||
|
||||
left_top.x = left->top.x >> CAIRO_BO_GUARD_BITS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue