b=463872; fix qt backend cairo build; r=me
authorVladimir Vukicevic <vladimir@pobox.com>
Sun, 09 Nov 2008 15:43:39 -0800
changeset 21540 d1baec088ee009f91aafdfb9f5e0c5d43c665db1
parent 21539 5975189375dac77d390bb0f45ab347b924b349d9
child 21541 fb44ae3d118255a923fa33631c09f77bc19792b7
push id3564
push uservladimir@mozilla.com
push dateSun, 09 Nov 2008 23:43:55 +0000
treeherdermozilla-central@d1baec088ee0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs463872
milestone1.9.1b2pre
b=463872; fix qt backend cairo build; r=me
gfx/cairo/README
gfx/cairo/cairo/src/cairo-qpainter-surface.cpp
gfx/cairo/cairo/src/cairo.h
gfx/cairo/qpainter-type.patch
--- a/gfx/cairo/README
+++ b/gfx/cairo/README
@@ -27,15 +27,17 @@ nonfatal-assertions.patch: Make assertio
 buggy-repeat.patch: Unconditionally turn on buggy-repeat handling to bandaid bug 413583.
 
 tmpfile_wince.patch: Make Windows CE use tmpfile() on windows mobile due to the lack of _open_osfhandle and no fs permissions.
 
 cairo-version-fixes.patch: fix up cairo-version.c/cairo-version.h for in-place builds
 
 win32-ddb-dib.patch: fix for bug 455513; not upstream yet pending feebdack
 
+qpainter-type.patch: add SURFACE_TYPE_QPAINTER to cairo.h
+
 ==== pixman patches ====
 
 endian.patch: include cairo-platform.h for endian macros
 
 ==== disable printing patch ====
 
 disable-printing.patch:  allows us to use NS_PRINTING to disable printing.
--- a/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp
+++ b/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp
@@ -596,16 +596,18 @@ static void
 
 static cairo_status_t
 _cairo_qpainter_surface_clone_similar (void *abstract_surface,
                                        cairo_surface_t *src,
                                        int              src_x,
                                        int              src_y,
                                        int              width,
                                        int              height,
+                                       int              *clone_offset_x,
+                                       int              *clone_offset_y,
                                        cairo_surface_t **clone_out)
 {
     cairo_qpainter_surface_t *qs = (cairo_qpainter_surface_t *) abstract_surface;
     cairo_surface_t *new_surf = NULL;
 
     // For non-image targets, always try to create a QPixmap first
     if (qs->image == NULL && (!_qpixmaps_have_no_alpha || src->content == CAIRO_CONTENT_COLOR))
     {
@@ -638,16 +640,18 @@ static cairo_status_t
 
     _cairo_pattern_fini (&upat.base);
 
     if (status) {
         cairo_surface_destroy (new_surf);
         new_surf = NULL;
     }
 
+    *clone_offset_x = 0;
+    *clone_offset_y = 0;
     *clone_out = new_surf;
     return (cairo_status_t) status;
 }
 
 static cairo_int_status_t
 _cairo_qpainter_surface_get_extents (void *abstract_surface,
                                      cairo_rectangle_int_t *extents)
 {
--- a/gfx/cairo/cairo/src/cairo.h
+++ b/gfx/cairo/cairo/src/cairo.h
@@ -1870,16 +1870,17 @@ cairo_surface_status (cairo_surface_t *s
  * @CAIRO_SURFACE_TYPE_QUARTZ: The surface is of type quartz
  * @CAIRO_SURFACE_TYPE_WIN32: The surface is of type win32
  * @CAIRO_SURFACE_TYPE_BEOS: The surface is of type beos
  * @CAIRO_SURFACE_TYPE_DIRECTFB: The surface is of type directfb
  * @CAIRO_SURFACE_TYPE_SVG: The surface is of type svg
  * @CAIRO_SURFACE_TYPE_OS2: The surface is of type os2
  * @CAIRO_SURFACE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface
  * @CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image
+ * @CAIRO_SURFACE_TYPE_QPAINTER: The surface is of type qpainter
  *
  * #cairo_surface_type_t is used to describe the type of a given
  * surface. The surface types are also known as "backends" or "surface
  * backends" within cairo.
  *
  * The type of a surface is determined by the function used to create
  * it, which will generally be of the form cairo_<emphasis>type</emphasis>_surface_create(),
  * (though see cairo_surface_create_similar() as well).
@@ -1908,17 +1909,18 @@ typedef enum _cairo_surface_type {
     CAIRO_SURFACE_TYPE_GLITZ,
     CAIRO_SURFACE_TYPE_QUARTZ,
     CAIRO_SURFACE_TYPE_WIN32,
     CAIRO_SURFACE_TYPE_BEOS,
     CAIRO_SURFACE_TYPE_DIRECTFB,
     CAIRO_SURFACE_TYPE_SVG,
     CAIRO_SURFACE_TYPE_OS2,
     CAIRO_SURFACE_TYPE_WIN32_PRINTING,
-    CAIRO_SURFACE_TYPE_QUARTZ_IMAGE
+    CAIRO_SURFACE_TYPE_QUARTZ_IMAGE,
+    CAIRO_SURFACE_TYPE_QPAINTER
 } cairo_surface_type_t;
 
 cairo_public cairo_surface_type_t
 cairo_surface_get_type (cairo_surface_t *surface);
 
 cairo_public cairo_content_t
 cairo_surface_get_content (cairo_surface_t *surface);
 
new file mode 100644
--- /dev/null
+++ b/gfx/cairo/qpainter-type.patch
@@ -0,0 +1,21 @@
+diff --git a/gfx/cairo/cairo/src/cairo.h b/gfx/cairo/cairo/src/cairo.h
+--- a/gfx/cairo/cairo/src/cairo.h
++++ b/gfx/cairo/cairo/src/cairo.h
+@@ -1875,6 +1875,7 @@
+  * @CAIRO_SURFACE_TYPE_OS2: The surface is of type os2
+  * @CAIRO_SURFACE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface
+  * @CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image
++ * @CAIRO_SURFACE_TYPE_QPAINTER: The surface is of type qpainter
+  *
+  * #cairo_surface_type_t is used to describe the type of a given
+  * surface. The surface types are also known as "backends" or "surface
+@@ -1913,7 +1914,8 @@
+     CAIRO_SURFACE_TYPE_SVG,
+     CAIRO_SURFACE_TYPE_OS2,
+     CAIRO_SURFACE_TYPE_WIN32_PRINTING,
+-    CAIRO_SURFACE_TYPE_QUARTZ_IMAGE
++    CAIRO_SURFACE_TYPE_QUARTZ_IMAGE,
++    CAIRO_SURFACE_TYPE_QPAINTER
+ } cairo_surface_type_t;
+ 
+ cairo_public cairo_surface_type_t