gfx/cairo/cairo-mask-extends-bug.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/cairo/cairo-mask-extends-bug.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c
     1.5 +--- a/gfx/cairo/cairo/src/cairo-image-surface.c
     1.6 ++++ b/gfx/cairo/cairo/src/cairo-image-surface.c
     1.7 +@@ -1788,18 +1788,35 @@ static cairo_status_t
     1.8 + 					    cairo_boxes_t *boxes)
     1.9 + {
    1.10 +     cairo_boxes_t clear;
    1.11 +     cairo_box_t box;
    1.12 +     cairo_status_t status;
    1.13 +     struct _cairo_boxes_chunk *chunk;
    1.14 +     int i;
    1.15 + 
    1.16 +-    if (boxes->num_boxes < 1 && clip_region == NULL)
    1.17 +-	return _cairo_image_surface_fixup_unbounded (dst, extents, NULL);
    1.18 ++    // If we have no boxes then we need to clear the entire extents
    1.19 ++    // because we have nothing to draw.
    1.20 ++    if (boxes->num_boxes < 1 && clip_region == NULL) {
    1.21 ++        int x = extents->unbounded.x;
    1.22 ++        int y = extents->unbounded.y;
    1.23 ++        int width = extents->unbounded.width;
    1.24 ++        int height = extents->unbounded.height;
    1.25 ++
    1.26 ++        pixman_color_t color = { 0 };
    1.27 ++        pixman_box32_t box = { x, y, x + width, y + height };
    1.28 ++
    1.29 ++        if (! pixman_image_fill_boxes (PIXMAN_OP_CLEAR,
    1.30 ++                                       dst->pixman_image,
    1.31 ++                                       &color,
    1.32 ++                                       1, &box)) {
    1.33 ++            return _cairo_error (CAIRO_STATUS_NO_MEMORY);
    1.34 ++        }
    1.35 ++        return CAIRO_STATUS_SUCCESS;
    1.36 ++    }
    1.37 + 
    1.38 +     _cairo_boxes_init (&clear);
    1.39 + 
    1.40 +     box.p1.x = _cairo_fixed_from_int (extents->unbounded.x + extents->unbounded.width);
    1.41 +     box.p1.y = _cairo_fixed_from_int (extents->unbounded.y);
    1.42 +     box.p2.x = _cairo_fixed_from_int (extents->unbounded.x);
    1.43 +     box.p2.y = _cairo_fixed_from_int (extents->unbounded.y + extents->unbounded.height);
    1.44 + 

mercurial