1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/cairo/handle-multi-path-clip.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 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 +@@ -2885,16 +2885,18 @@ static cairo_status_t 1.8 + cairo_bool_t need_clip_mask = FALSE; 1.9 + cairo_status_t status; 1.10 + struct _cairo_boxes_chunk *chunk; 1.11 + uint32_t pixel; 1.12 + int i; 1.13 + 1.14 + if (clip != NULL) { 1.15 + status = _cairo_clip_get_region (clip, &clip_region); 1.16 ++ if (unlikely (status == CAIRO_INT_STATUS_NOTHING_TO_DO)) 1.17 ++ return CAIRO_STATUS_SUCCESS; 1.18 + need_clip_mask = status == CAIRO_INT_STATUS_UNSUPPORTED; 1.19 + if (need_clip_mask && 1.20 + (op == CAIRO_OPERATOR_SOURCE || ! extents->is_bounded)) 1.21 + { 1.22 + return CAIRO_INT_STATUS_UNSUPPORTED; 1.23 + } 1.24 + 1.25 + if (clip_region != NULL && cairo_region_num_rectangles (clip_region) == 1) 1.26 +@@ -3200,30 +3202,20 @@ static cairo_status_t 1.27 + return _clip_and_composite (dst, op, src, 1.28 + _composite_traps, &info, 1.29 + extents, clip); 1.30 + } 1.31 + 1.32 + static cairo_clip_path_t * 1.33 + _clip_get_single_path (cairo_clip_t *clip) 1.34 + { 1.35 +- cairo_clip_path_t *iter = clip->path; 1.36 +- cairo_clip_path_t *path = NULL; 1.37 +- 1.38 +- do { 1.39 +- if ((iter->flags & CAIRO_CLIP_PATH_IS_BOX) == 0) { 1.40 +- if (path != NULL) 1.41 +- return FALSE; 1.42 +- 1.43 +- path = iter; 1.44 +- } 1.45 +- iter = iter->prev; 1.46 +- } while (iter != NULL); 1.47 +- 1.48 +- return path; 1.49 ++ if (clip->path->prev == NULL) 1.50 ++ return clip->path; 1.51 ++ 1.52 ++ return NULL; 1.53 + } 1.54 + 1.55 + /* high level image interface */ 1.56 + 1.57 + static cairo_int_status_t 1.58 + _cairo_image_surface_paint (void *abstract_surface, 1.59 + cairo_operator_t op, 1.60 + const cairo_pattern_t *source,