From 4b3274bd77af0371f0731a05bd972f31ee50c962 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 13 Nov 2010 17:24:31 +0100 Subject: [PATCH 5/5] cairo-image-surface: surface_fill is broken for polygons for A1 Filling a polygon is failing for CAIRO_FORMAT_A1 surfaces. Fallback to the cairo-surface-fallback code like it was in cairo 1.8. This is just to fix the regression. --- src/cairo-image-surface.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 8be73b7..ee547a7 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -42,12 +42,14 @@ #include "cairo-boxes-private.h" #include "cairo-clip-private.h" #include "cairo-composite-rectangles-private.h" +#include "cairo-surface-fallback-private.h" #include "cairo-error-private.h" #include "cairo-region-private.h" #include "cairo-scaled-font-private.h" #include "cairo-surface-snapshot-private.h" #include "cairo-surface-subsurface-private.h" + /* Limit on the width / height of an image surface in pixels. This is * mainly determined by coordinates of things sent to pixman at the * moment being in 16.16 format. */ @@ -3704,6 +3706,12 @@ _cairo_image_surface_fill (void *abstract_surface, int num_boxes = ARRAY_LENGTH (boxes_stack); cairo_status_t status; + + if (surface->format == CAIRO_FORMAT_A1) + return _cairo_surface_fallback_fill(abstract_surface, op, source, + path, fill_rule, tolerance, + antialias, clip); + status = _cairo_composite_rectangles_init_for_fill (&extents, surface->width, surface->height, -- 1.7.3.2