From 105a5ead75010d42391eaaed39a2755e32546a13 Mon Sep 17 00:00:00 2001 From: "roc+@cs.cmu.edu" Date: Thu, 17 Apr 2008 01:22:31 -0700 Subject: [PATCH] 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 | 4 ++++ gfx/cairo/cairo/src/cairo-clip.c | 3 +-- gfx/cairo/clip-clone.patch | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 gfx/cairo/clip-clone.patch diff --git a/gfx/cairo/README b/gfx/cairo/README index bb9f365e390..220bcc3a6c1 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -27,6 +27,10 @@ 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 diff --git a/gfx/cairo/cairo/src/cairo-clip.c b/gfx/cairo/cairo/src/cairo-clip.c index 28057e58b9c..c7df78ed1f4 100644 --- a/gfx/cairo/cairo/src/cairo-clip.c +++ b/gfx/cairo/cairo/src/cairo-clip.c @@ -678,8 +678,7 @@ _cairo_clip_init_deep_copy (cairo_clip_t *clip, 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); diff --git a/gfx/cairo/clip-clone.patch b/gfx/cairo/clip-clone.patch new file mode 100644 index 00000000000..0d2585aaa5d --- /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)