summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-10-01 02:30:15 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-10-01 02:30:15 -0400
commite0bbbbde9ed7d19f390f1cd840f81e338568f599 (patch)
tree5416f1892c2b60388bdc86382ddf4136b3ed5aaa
parent8ae177c92e3fcb05552d1ae1b71b7e856df87e57 (diff)
fill with command buffer
-rw-r--r--src/cairo-pixman-surface.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cairo-pixman-surface.c b/src/cairo-pixman-surface.c
index 0b9b6000..bf0c0f03 100644
--- a/src/cairo-pixman-surface.c
+++ b/src/cairo-pixman-surface.c
@@ -667,7 +667,6 @@ command_buffer_process (command_buffer_t *buffer, int width, int height)
case NEW_BROKEN:
goto out;
- break;
case NEW_WHITE:
images[command->new_white.id] = pixman_image_ref (white_img);
@@ -2273,6 +2272,9 @@ cairo_pixman_surface_fill (void *abstract_surface,
cairo_pixman_surface_t *psurface = abstract_surface;
cairo_int_status_t status;
cairo_traps_t traps;
+ int width = pixman_image_get_width (psurface->pimage);
+ int height = pixman_image_get_height (psurface->pimage);
+ command_buffer_t *buffer = command_buffer_new ();
_cairo_traps_init (&traps);
@@ -2281,12 +2283,21 @@ cairo_pixman_surface_fill (void *abstract_surface,
if (status == CAIRO_INT_STATUS_SUCCESS)
{
- status = clip_and_composite_traps (
- psurface, op, source, &traps, antialias, clip);
+ pixman_trapezoid_t *ptraps;
+ int mask_id;
+
+ ptraps = traps_to_pixman_trapezoids (&traps);
+
+ mask_id = command_buffer_new_traps (
+ &buffer, antialias, traps.num_traps, ptraps);
+
+ clip_and_composite2 (
+ &buffer, psurface, op, source, mask_id, clip);
}
_cairo_traps_fini (&traps);
- return status;
+
+ return command_buffer_process (buffer, width, height);
}
static pixman_glyph_cache_t *global_glyph_cache;