diff --git a/configure.in b/configure.in index 3d76a42b840b..31d5a4ef34a8 100644 --- a/configure.in +++ b/configure.in @@ -7363,7 +7363,7 @@ if test "$MOZ_TREE_CAIRO"; then CAIRO_FT_CFLAGS="$FT2_CFLAGS" fi if test "$MOZ_WIDGET_TOOLKIT" = "qt"; then - QPAINTER_SURFACE_FEATURE="#define CAIRO_HAS_QPAINTER_SURFACE 1" + QT_SURFACE_FEATURE="#define CAIRO_HAS_QT_SURFACE 1" fi if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then QUARTZ_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_SURFACE 1" @@ -7452,7 +7452,7 @@ if test "$MOZ_TREE_CAIRO"; then AC_SUBST(WIN32_FONT_FEATURE) AC_SUBST(QUARTZ_FONT_FEATURE) AC_SUBST(PNG_FUNCTIONS_FEATURE) - AC_SUBST(QPAINTER_SURFACE_FEATURE) + AC_SUBST(QT_SURFACE_FEATURE) if test "$_WIN32_MSVC"; then MOZ_CAIRO_LIBS='$(DEPTH)/gfx/cairo/cairo/src/mozcairo.lib $(DEPTH)/gfx/cairo/libpixman/src/mozlibpixman.lib' diff --git a/gfx/cairo/README b/gfx/cairo/README index 4c5fd49319f3..d22940f08c54 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -30,8 +30,6 @@ 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 - wince-fixes.patch: stubs out win32 functions we use but are not supported on win32. Also implements ExtSelectClipRgn in terms of other functions available on wince. win32-vertically-offset-glyph.patch: bug 454098; vertical positioning errors when drawing glyph runs including delta-y offsets on screen via GDI diff --git a/gfx/cairo/cairo/src/cairo-features.h.in b/gfx/cairo/cairo/src/cairo-features.h.in index 9a08b68808a1..d40c570006a0 100644 --- a/gfx/cairo/cairo/src/cairo-features.h.in +++ b/gfx/cairo/cairo/src/cairo-features.h.in @@ -79,7 +79,7 @@ @DIRECTFB_SURFACE_FEATURE@ -@QPAINTER_SURFACE_FEATURE@ +@QT_SURFACE_FEATURE@ @DDRAW_SURFACE_FEATURE@ diff --git a/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp b/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp index 29c158fe25f7..08ad452bd021 100644 --- a/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp +++ b/gfx/cairo/cairo/src/cairo-qpainter-surface.cpp @@ -842,7 +842,7 @@ struct PatternToBrushConverter { cairo_surface_pattern_t *spattern = (cairo_surface_pattern_t*) pattern; cairo_surface_t *surface = spattern->surface; - if (surface->type == CAIRO_SURFACE_TYPE_QPAINTER) { + if (surface->type == CAIRO_SURFACE_TYPE_QT) { cairo_qpainter_surface_t *qs = (cairo_qpainter_surface_t*) surface; if (qs->image) { @@ -1148,7 +1148,7 @@ _cairo_qpainter_fast_fill (cairo_qpainter_surface_t *qs, if (source->type == CAIRO_PATTERN_TYPE_SURFACE) { cairo_surface_pattern_t *spattern = (cairo_surface_pattern_t*) source; - if (spattern->surface->type == CAIRO_SURFACE_TYPE_QPAINTER) { + if (spattern->surface->type == CAIRO_SURFACE_TYPE_QT) { cairo_qpainter_surface_t *p = (cairo_qpainter_surface_t*) spattern->surface; qsSrc_image = p->image; @@ -1504,7 +1504,7 @@ _cairo_qpainter_surface_composite (cairo_operator_t op, qimg_d.reset(qimg); } - if (surface->type == CAIRO_SURFACE_TYPE_QPAINTER) { + if (surface->type == CAIRO_SURFACE_TYPE_QT) { cairo_qpainter_surface_t *qsrc = (cairo_qpainter_surface_t*) surface; if (qsrc->image) @@ -1557,7 +1557,7 @@ _cairo_qpainter_surface_flush (void *abstract_surface) **/ static const cairo_surface_backend_t cairo_qpainter_surface_backend = { - CAIRO_SURFACE_TYPE_QPAINTER, + CAIRO_SURFACE_TYPE_QT, _cairo_qpainter_surface_create_similar, _cairo_qpainter_surface_finish, _cairo_qpainter_surface_acquire_source_image, @@ -1776,7 +1776,7 @@ cairo_qpainter_surface_get_qpainter (cairo_surface_t *surface) { cairo_qpainter_surface_t *qs = (cairo_qpainter_surface_t*) surface; - if (surface->type != CAIRO_SURFACE_TYPE_QPAINTER) + if (surface->type != CAIRO_SURFACE_TYPE_QT) return NULL; return qs->p; @@ -1787,7 +1787,7 @@ cairo_qpainter_surface_get_qimage (cairo_surface_t *surface) { cairo_qpainter_surface_t *qs = (cairo_qpainter_surface_t*) surface; - if (surface->type != CAIRO_SURFACE_TYPE_QPAINTER) + if (surface->type != CAIRO_SURFACE_TYPE_QT) return NULL; return qs->image; @@ -1798,7 +1798,7 @@ cairo_qpainter_surface_get_image (cairo_surface_t *surface) { cairo_qpainter_surface_t *qs = (cairo_qpainter_surface_t*) surface; - if (surface->type != CAIRO_SURFACE_TYPE_QPAINTER) + if (surface->type != CAIRO_SURFACE_TYPE_QT) return NULL; return (cairo_surface_t*) qs->image_equiv; diff --git a/gfx/cairo/cairo/src/cairo-qpainter.h b/gfx/cairo/cairo/src/cairo-qpainter.h index 0e834bef1a78..e06d06b2cd5b 100644 --- a/gfx/cairo/cairo/src/cairo-qpainter.h +++ b/gfx/cairo/cairo/src/cairo-qpainter.h @@ -39,7 +39,7 @@ #include -#if CAIRO_HAS_QPAINTER_SURFACE +#if CAIRO_HAS_QT_SURFACE class QPainter; class QImage; @@ -70,10 +70,10 @@ cairo_qpainter_surface_get_qimage (cairo_surface_t *surface); CAIRO_END_DECLS -#else /* CAIRO_HAS_QPAINTER_SURFACE */ +#else /* CAIRO_HAS_QT_SURFACE */ # error Cairo was not compiled with support for the QPainter backend -#endif /* CAIRO_HAS_QPAINTER_SURFACE */ +#endif /* CAIRO_HAS_QT_SURFACE */ #endif /* CAIRO_QPAINTER_H_ */ diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h index b712e8d72f0c..4598d0fe5408 100644 --- a/gfx/cairo/cairo/src/cairoint.h +++ b/gfx/cairo/cairo/src/cairoint.h @@ -2534,7 +2534,7 @@ _cairo_pattern_is_opaque (const cairo_pattern_t *abstract_pattern); enum { CAIRO_PATTERN_ACQUIRE_NONE = 0x0, - CAIRO_PATTERN_ACQUIRE_NO_REFLECT = 0x1, + CAIRO_PATTERN_ACQUIRE_NO_REFLECT = 0x1 }; cairo_private cairo_int_status_t _cairo_pattern_acquire_surface (const cairo_pattern_t *pattern, diff --git a/gfx/cairo/qpainter-type.patch b/gfx/cairo/qpainter-type.patch deleted file mode 100644 index ebe2f9b79626..000000000000 --- a/gfx/cairo/qpainter-type.patch +++ /dev/null @@ -1,21 +0,0 @@ -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 diff --git a/gfx/thebes/src/gfxASurface.cpp b/gfx/thebes/src/gfxASurface.cpp index ad8059652c19..08015573ea51 100644 --- a/gfx/thebes/src/gfxASurface.cpp +++ b/gfx/thebes/src/gfxASurface.cpp @@ -59,7 +59,7 @@ #include "gfxDirectFBSurface.h" #endif -#ifdef CAIRO_HAS_QPAINTER_SURFACE +#ifdef CAIRO_HAS_QT_SURFACE #include "gfxQPainterSurface.h" #endif @@ -180,8 +180,8 @@ gfxASurface::Wrap (cairo_surface_t *csurf) result = new gfxDirectFBSurface(csurf); } #endif -#ifdef CAIRO_HAS_QPAINTER_SURFACE - else if (stype == CAIRO_SURFACE_TYPE_QPAINTER) { +#ifdef CAIRO_HAS_QT_SURFACE + else if (stype == CAIRO_SURFACE_TYPE_QT) { result = new gfxQPainterSurface(csurf); } #endif diff --git a/gfx/thebes/src/gfxQtPlatform.cpp b/gfx/thebes/src/gfxQtPlatform.cpp index e4fd966c479b..df6df71694a5 100644 --- a/gfx/thebes/src/gfxQtPlatform.cpp +++ b/gfx/thebes/src/gfxQtPlatform.cpp @@ -363,6 +363,9 @@ gfxQtPlatform::GetFTLibrary() return gPlatformFTLibrary; } +void gfxQtPlatform::InitDisplayCaps() +{ } + FontFamily * gfxQtPlatform::FindFontFamily(const nsAString& aName) {