Bug 409227. _cairo_clip_init_deep_copy should pass 0,0 as the starting coordinates when it clones the clip surface, because we just want an exact copy of the surface. r=vlad,a=beltzner
authorroc+@cs.cmu.edu
Thu, 17 Apr 2008 01:22:31 -0700
changeset 14411 323379f48d53223cf161b7e92dbb749a803b8333
parent 14410 fc30f69feef6c6a49d62ca246ce44cbcf7cfa76f
child 14412 c750ec74db464f6b45ecbdc96d9428e4f45733aa
push idunknown
push userunknown
push dateunknown
reviewersvlad, beltzner
bugs409227
milestone1.9pre
Bug 409227. _cairo_clip_init_deep_copy should pass 0,0 as the starting coordinates when it clones the clip surface, because we just want an exact copy of the surface. r=vlad,a=beltzner
gfx/cairo/README
gfx/cairo/cairo/src/cairo-clip.c
gfx/cairo/clip-clone.patch
--- a/gfx/cairo/README
+++ b/gfx/cairo/README
@@ -22,12 +22,16 @@ Some specific things:
 max-font-size.patch: Clamp freetype font size to 1000 to avoid overflow issues
 
 win32-logical-font-scale.patch: set CAIRO_WIN32_LOGICAL_FONT_SCALE to 1
 
 nonfatal-assertions.patch: Make assertions non-fatal
 
 buggy-repeat.patch: Unconditionally turn on buggy-repeat handling to bandaid bug 413583.
 
+clip-clone.patch: _cairo_clip_init_deep_copy should pass 0,0 as the
+source coordinates to clone from since it wants an exact copy of the
+source's clipping surface
+
 ==== pixman patches ====
 
 endian.patch: include cairo-platform.h for endian macros
 
--- a/gfx/cairo/cairo/src/cairo-clip.c
+++ b/gfx/cairo/cairo/src/cairo-clip.c
@@ -673,18 +673,17 @@ cairo_status_t
 	    if (status)
 		goto BAIL;
 
 	    clip->has_region = TRUE;
         }
 
         if (other->surface) {
             status = _cairo_surface_clone_similar (target, other->surface,
-					           other->surface_rect.x,
-						   other->surface_rect.y,
+					           0, 0,
 						   other->surface_rect.width,
 						   other->surface_rect.height,
 						   &clip->surface);
 	    if (status)
 		goto BAIL;
 
             clip->surface_rect = other->surface_rect;
         }
new file mode 100644
--- /dev/null
+++ b/gfx/cairo/clip-clone.patch
@@ -0,0 +1,31 @@
+diff -NrpU12 mozilla-trunk.56113bebf57f/gfx/cairo/cairo/src/cairo-clip.c mozilla-trunk/gfx/cairo/cairo/src/cairo-clip.c
+--- mozilla-trunk.56113bebf57f/gfx/cairo/cairo/src/cairo-clip.c	2008-04-16 16:02:09.000000000 +1200
++++ mozilla-trunk/gfx/cairo/cairo/src/cairo-clip.c	2008-04-16 16:02:09.000000000 +1200
+@@ -669,26 +669,25 @@ _cairo_clip_init_deep_copy (cairo_clip_t
+          * whatever the right handling is happen */
+     } else {
+         if (other->has_region) {
+             status = _cairo_region_copy (&clip->region, &other->region);
+ 	    if (status)
+ 		goto BAIL;
+ 
+ 	    clip->has_region = TRUE;
+         }
+ 
+         if (other->surface) {
+             status = _cairo_surface_clone_similar (target, other->surface,
+-					           other->surface_rect.x,
+-						   other->surface_rect.y,
++					           0, 0,
+ 						   other->surface_rect.width,
+ 						   other->surface_rect.height,
+ 						   &clip->surface);
+ 	    if (status)
+ 		goto BAIL;
+ 
+             clip->surface_rect = other->surface_rect;
+         }
+ 
+         if (other->path) {
+             status = _cairo_clip_path_reapply_clip_path (clip, other->path);
+ 	    if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)