mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 01:28:18 +02:00
Fix intersect_with_boxes() to produce tight clip extents
Previous code was intersecting extents with infinitely large rectangle. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
8fb9a6727e
commit
441f9c5037
1 changed files with 3 additions and 2 deletions
|
|
@ -1399,8 +1399,9 @@ intersect_with_boxes (cairo_composite_rectangles_t *extents,
|
|||
cairo_rectangle_int_t rect;
|
||||
cairo_box_t box;
|
||||
|
||||
box.p1.x = box.p1.y = INT_MIN;
|
||||
box.p2.x = box.p2.y = INT_MAX;
|
||||
/* Find the extents over all the clip boxes */
|
||||
box.p1.x = box.p1.y = INT_MAX;
|
||||
box.p2.x = box.p2.y = INT_MIN;
|
||||
while (num_boxes--) {
|
||||
if (boxes->p1.x < box.p1.x)
|
||||
box.p1.x = boxes->p1.x;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue