Bug 977880 - Handle ReleaseFence on tiled thebes layer r=cwiiis,nical,BenWa
[gecko.git] / gfx / cairo / fix-clip-copy.patch
blobc2c3b2fc87ad18fa893ed7c16d207867fcba1a50
1 commit f49a9740350d2f0d69ed59e913f0263a899cfb2a
2 Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
3 Date: Fri Jan 29 14:39:24 2010 -0500
5 Fix clip copy
7 diff --git a/src/cairo-clip.c b/src/cairo-clip.c
8 index 8d66a5f..6acbcff 100644
9 --- a/src/cairo-clip.c
10 +++ b/src/cairo-clip.c
11 @@ -280,13 +280,12 @@ cairo_clip_t *
12 _cairo_clip_init_copy (cairo_clip_t *clip, cairo_clip_t *other)
14 if (other != NULL) {
15 - if (other->path == NULL) {
16 - _cairo_clip_init (clip);
17 - clip = NULL;
18 - } else {
19 - clip->all_clipped = other->all_clipped;
20 - clip->path = _cairo_clip_path_reference (other->path);
21 - }
22 + clip->all_clipped = other->all_clipped;
23 + clip->path = _cairo_clip_path_reference (other->path);
25 + /* this guy is here because of the weird return semantics of _cairo_clip_init_copy */
26 + if (!other->path)
27 + return NULL;
28 } else {
29 _cairo_clip_init (clip);