From 06e9caf86199e8261a07db6d4774628fa147728d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 28 Apr 2010 20:05:13 +0200 Subject: [PATCH] image: pixman_image_fill_rectangles() => pixman_image_fill_boxes() --- src/cairo-image-surface.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 662e94ee6..77f5ce766 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -4140,8 +4140,8 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface, cairo_image_surface_t *surface = abstract_surface; pixman_color_t pixman_color; - pixman_rectangle16_t stack_rects[CAIRO_STACK_ARRAY_LENGTH (pixman_rectangle16_t)]; - pixman_rectangle16_t *pixman_rects = stack_rects; + pixman_box32_t stack_boxes[CAIRO_STACK_ARRAY_LENGTH (pixman_rectangle16_t)]; + pixman_box32_t *pixman_boxes = stack_boxes; int i; cairo_int_status_t status; @@ -4154,31 +4154,31 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface, pixman_color.blue = color->blue_short; pixman_color.alpha = color->alpha_short; - if (num_rects > ARRAY_LENGTH (stack_rects)) { - pixman_rects = _cairo_malloc_ab (num_rects, sizeof (pixman_rectangle16_t)); - if (unlikely (pixman_rects == NULL)) + if (num_rects > ARRAY_LENGTH (stack_boxes)) { + pixman_boxes = _cairo_malloc_ab (num_rects, sizeof (pixman_rectangle16_t)); + if (unlikely (pixman_boxes == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY); } for (i = 0; i < num_rects; i++) { - pixman_rects[i].x = rects[i].x; - pixman_rects[i].y = rects[i].y; - pixman_rects[i].width = rects[i].width; - pixman_rects[i].height = rects[i].height; + pixman_boxes[i].x1 = rects[i].x; + pixman_boxes[i].y1 = rects[i].y; + pixman_boxes[i].x2 = rects[i].x + rects[i].width; + pixman_boxes[i].y2 = rects[i].y + rects[i].height; } status = CAIRO_STATUS_SUCCESS; - if (! pixman_image_fill_rectangles (_pixman_operator (op), - surface->pixman_image, - &pixman_color, - num_rects, - pixman_rects)) + if (! pixman_image_fill_boxes (_pixman_operator (op), + surface->pixman_image, + &pixman_color, + num_rects, + pixman_boxes)) { status = _cairo_error (CAIRO_STATUS_NO_MEMORY); } - if (pixman_rects != stack_rects) - free (pixman_rects); + if (pixman_boxes != stack_boxes) + free (pixman_boxes); return status; }