diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-03 17:38:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-03 17:38:21 +0100 |
commit | d6a05676849509049fc54eea2559803b6247a6fe (patch) | |
tree | daa475d1127713396a8293f4c02d06ea48957e9a /src/cairo-rectangle.c | |
parent | 8020e0bc8cbd3e5ac188eb305b74ae1c1f362a31 (diff) | |
download | cairo-d6a05676849509049fc54eea2559803b6247a6fe.tar.gz |
stroke: Remove redundant code for computing culling extents
Same code repeated!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-rectangle.c')
-rw-r--r-- | src/cairo-rectangle.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/cairo-rectangle.c b/src/cairo-rectangle.c index 96130659c..47f2837c7 100644 --- a/src/cairo-rectangle.c +++ b/src/cairo-rectangle.c @@ -85,22 +85,10 @@ _cairo_boxes_get_extents (const cairo_box_t *boxes, int num_boxes, cairo_box_t *extents) { - int n; - assert (num_boxes > 0); *extents = *boxes; - - for (n = 1; n < num_boxes; n++) { - if (boxes[n].p1.x < extents->p1.x) - extents->p1.x = boxes[n].p1.x; - if (boxes[n].p2.x > extents->p2.x) - extents->p2.x = boxes[n].p2.x; - - if (boxes[n].p1.y < extents->p1.y) - extents->p1.y = boxes[n].p1.y; - if (boxes[n].p2.y > extents->p2.y) - extents->p2.y = boxes[n].p2.y; - } + while (--num_boxes) + _cairo_box_add_box (extents, ++boxes); } /* XXX We currently have a confusing mix of boxes and rectangles as |