From ad77640a1ed1bd39ca76e53a93b94caf0e608990 Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Sun, 9 Nov 2008 15:43:39 -0800 Subject: [PATCH] b=463872; fix qt backend cairo build; r=me --- gfx/cairo/README | 2 ++ .../cairo/src/cairo-qpainter-surface.cpp | 4 ++++ gfx/cairo/cairo/src/cairo.h | 4 +++- gfx/cairo/qpainter-type.patch | 21 +++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gfx/cairo/qpainter-type.patch diff --git a/gfx/cairo/README b/gfx/cairo/README index 1a3110e86653..42973bf48b3d 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -32,6 +32,8 @@ cairo-version-fixes.patch: fix up cairo-version.c/cairo-version.h for in-place b 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 diff --git a/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp b/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp index 93679e45bb95..b5a6eabfe8b7 100644 --- a/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp +++ b/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp @@ -601,6 +601,8 @@ _cairo_qpainter_surface_clone_similar (void *abstract_surface, 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; @@ -643,6 +645,8 @@ _cairo_qpainter_surface_clone_similar (void *abstract_surface, new_surf = NULL; } + *clone_offset_x = 0; + *clone_offset_y = 0; *clone_out = new_surf; return (cairo_status_t) status; } diff --git a/gfx/cairo/cairo/src/cairo.h b/gfx/cairo/cairo/src/cairo.h index cf4bc05b389c..cfdde99b1304 100644 --- a/gfx/cairo/cairo/src/cairo.h +++ b/gfx/cairo/cairo/src/cairo.h @@ -1875,6 +1875,7 @@ cairo_surface_status (cairo_surface_t *surface); * @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 @@ typedef enum _cairo_surface_type { 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 diff --git a/gfx/cairo/qpainter-type.patch b/gfx/cairo/qpainter-type.patch new file mode 100644 index 000000000000..ebe2f9b79626 --- /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