Fix gaius orange/windows thebes builds

This commit is contained in:
vladimir%pobox.com 2005-11-29 22:56:40 +00:00
parent f87d628db7
commit a13e3c0bd1
8 changed files with 44 additions and 36 deletions

View File

@ -83,6 +83,7 @@ STATIC_EXTRA_LIBS += \
$(NULL)
endif
ifndef MOZ_ENABLE_CAIRO_GFX
ifdef MOZ_SVG
STATIC_EXTRA_LIBS += $(MOZ_LIBART_LIBS) $(MOZ_CAIRO_LIBS)
ifdef MOZ_SVG_RENDERER_GDIPLUS
@ -93,6 +94,7 @@ ifdef MOZ_ENABLE_CANVAS # not SVG, but yes on canvas
STATIC_EXTRA_LIBS += $(MOZ_CAIRO_LIBS)
endif
endif
endif
ifdef MOZ_ENABLE_XINERAMA
STATIC_EXTRA_LIBS += $(MOZ_XINERAMA_LIBS)

23
configure vendored
View File

@ -18657,6 +18657,8 @@ EOF
SANITY_CHECKING_FEATURE="#undef CAIRO_DO_SANITY_CHECKING"
fi
PNG_FUNCTIONS_FEATURE="#define CAIRO_HAS_PNG_FUNCTIONS 1"
@ -18704,7 +18706,7 @@ EOF
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:18708: checking for $ac_word" >&5
echo "configure:18710: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -18748,19 +18750,19 @@ fi
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
echo $ac_n "checking for cairo >= $CAIRO_VERSION""... $ac_c" 1>&6
echo "configure:18752: checking for cairo >= $CAIRO_VERSION" >&5
echo "configure:18754: checking for cairo >= $CAIRO_VERSION" >&5
if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION" ; then
echo "$ac_t""yes" 1>&6
succeeded=yes
echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6
echo "configure:18759: checking CAIRO_CFLAGS" >&5
echo "configure:18761: checking CAIRO_CFLAGS" >&5
CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION"`
echo "$ac_t""$CAIRO_CFLAGS" 1>&6
echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6
echo "configure:18764: checking CAIRO_LIBS" >&5
echo "configure:18766: checking CAIRO_LIBS" >&5
## Remove evil flags like -Wl,--export-dynamic
CAIRO_LIBS="`$PKG_CONFIG --libs \"cairo >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
echo "$ac_t""$CAIRO_LIBS" 1>&6
@ -18824,7 +18826,7 @@ if test `echo "$MOZ_EXTENSIONS" | grep -c python/xpcom` -ne 0; then
# Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:18828: checking for $ac_word" >&5
echo "configure:18830: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -19086,14 +19088,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 19090 "configure"
#line 19092 "configure"
#include "confdefs.h"
#include <gmodule.h>
int main() {
int x = 1; x++;
; return 0; }
EOF
if { (eval echo configure:19097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:19099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
@ -19388,7 +19390,7 @@ if test "$MOZ_X11"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $XCFLAGS"
cat > conftest.$ac_ext <<EOF
#line 19392 "configure"
#line 19394 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -19404,7 +19406,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:19408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:19410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
@ -19978,7 +19980,7 @@ s%@MOZ_LIBART_CFLAGS@%$MOZ_LIBART_CFLAGS%g
s%@MOZ_LIBART_LIBS@%$MOZ_LIBART_LIBS%g
s%@PS_SURFACE_FEATURE@%$PS_SURFACE_FEATURE%g
s%@PDF_SURFACE_FEATURE@%$PDF_SURFACE_FEATURE%g
s%@PNG_SURFACE_FEATURE@%$PNG_SURFACE_FEATURE%g
s%@PNG_FUNCTIONS_FEATURE@%$PNG_FUNCTIONS_FEATURE%g
s%@XLIB_SURFACE_FEATURE@%$XLIB_SURFACE_FEATURE%g
s%@QUARTZ_SURFACE_FEATURE@%$QUARTZ_SURFACE_FEATURE%g
s%@XCB_SURFACE_FEATURE@%$XCB_SURFACE_FEATURE%g
@ -19987,7 +19989,6 @@ s%@GLITZ_SURFACE_FEATURE@%$GLITZ_SURFACE_FEATURE%g
s%@FT_FONT_FEATURE@%$FT_FONT_FEATURE%g
s%@WIN32_FONT_FEATURE@%$WIN32_FONT_FEATURE%g
s%@ATSUI_FONT_FEATURE@%$ATSUI_FONT_FEATURE%g
s%@PNG_FUNCTIONS_FEATURE@%$PNG_FUNCTIONS_FEATURE%g
s%@SANITY_CHECKING_FEATURE@%$SANITY_CHECKING_FEATURE%g
s%@CAIRO_CFLAGS@%$CAIRO_CFLAGS%g
s%@CAIRO_LIBS@%$CAIRO_LIBS%g

View File

@ -6428,9 +6428,11 @@ if test "$MOZ_SVG_RENDERER_CAIRO" -o "$MOZ_ENABLE_CANVAS" -o "$MOZ_ENABLE_CAIRO_
SANITY_CHECKING_FEATURE="#undef CAIRO_DO_SANITY_CHECKING"
fi
PNG_FUNCTIONS_FEATURE="#define CAIRO_HAS_PNG_FUNCTIONS 1"
AC_SUBST(PS_SURFACE_FEATURE)
AC_SUBST(PDF_SURFACE_FEATURE)
AC_SUBST(PNG_SURFACE_FEATURE)
AC_SUBST(PNG_FUNCTIONS_FEATURE)
AC_SUBST(XLIB_SURFACE_FEATURE)
AC_SUBST(QUARTZ_SURFACE_FEATURE)
AC_SUBST(XCB_SURFACE_FEATURE)

View File

@ -276,7 +276,7 @@ nsThebesDeviceContext::CreateRenderingContext(nsIDrawingSurface *aSurface,
NS_IMETHODIMP
nsThebesDeviceContext::CreateRenderingContext(nsIWidget *aWidget,
nsIRenderingContext *&aContext)
nsIRenderingContext *&aContext)
{
nsresult rv;
@ -284,7 +284,11 @@ nsThebesDeviceContext::CreateRenderingContext(nsIWidget *aWidget,
nsCOMPtr<nsIRenderingContext> pContext;
rv = CreateRenderingContextInstance(*getter_AddRefs(pContext));
if (NS_SUCCEEDED(rv)) {
rv = pContext->Init(this, aWidget->GetThebesSurface());
nsRefPtr<gfxASurface> surface(aWidget->GetThebesSurface());
if (surface)
rv = pContext->Init(this, surface);
else
rv = pContext->Init(this, aWidget);
if (NS_SUCCEEDED(rv)) {
aContext = pContext;
NS_ADDREF(aContext);

View File

@ -41,7 +41,9 @@
#include "nsMemory.h"
#if defined(MOZ_ENABLE_GTK2)
#include "gfxPlatform.h"
#endif
#include "gfxImageSurface.h"

View File

@ -49,7 +49,7 @@ public:
* This is a singleton; it contains mostly convenience
* functions to obtain platform-specific objects.
*/
static gfxPlatform* GetPlatform();
static gfxPlatform *GetPlatform();
/**
* Return PR_TRUE if we're to use Glitz for acceleration.
@ -69,15 +69,15 @@ public:
* create a surface that is optimized for rapid pixel
* changing.
*/
virtual gfxASurface* CreateOffscreenSurface (PRUint32 width,
PRUint32 height,
gfxASurface::gfxImageFormat imageFormat,
PRBool fastPixelAccess = PR_FALSE) = 0;
virtual gfxASurface *CreateOffscreenSurface(PRUint32 width,
PRUint32 height,
gfxASurface::gfxImageFormat imageFormat,
PRBool fastPixelAccess = PR_FALSE) = 0;
protected:
gfxPlatform() { }
~gfxPlatform() { }
static gfxPlatform* mPlatform;
static gfxPlatform *mPlatform;
static int mGlitzState;
};

View File

@ -46,19 +46,19 @@ class NS_EXPORT gfxPlatformGtk : public gfxPlatform {
public:
gfxPlatformGtk();
static gfxPlatformGtk* GetPlatform() {
static gfxPlatformGtk *GetPlatform() {
return (gfxPlatformGtk*) gfxPlatform::GetPlatform();
}
gfxASurface* CreateOffscreenSurface (PRUint32 width,
PRUint32 height,
gfxASurface::gfxImageFormat imageFormat,
PRBool fastPixelAccess);
gfxASurface *CreateOffscreenSurface(PRUint32 width,
PRUint32 height,
gfxASurface::gfxImageFormat imageFormat,
PRBool fastPixelAccess);
GdkDrawable* GetSurfaceGdkDrawable (gfxASurface *aSurf);
GdkDrawable *GetSurfaceGdkDrawable(gfxASurface *aSurf);
void SetSurfaceGdkWindow (gfxASurface *aSurf,
GdkWindow *win);
void SetSurfaceGdkWindow(gfxASurface *aSurf,
GdkWindow *win);
};
#endif /* GFX_PLATFORM_GTK_H */

View File

@ -48,11 +48,6 @@
#include "nsIScreenManager.h"
#include "nsAppDirectoryServiceDefs.h"
#ifdef MOZ_CAIRO_GFX
#include <stdlib.h>
#include "gfxPlatform.h"
#endif
#ifdef DEBUG
#include "nsIServiceManager.h"
#include "nsIPref.h"
@ -617,10 +612,12 @@ nsIRenderingContext* nsBaseWidget::GetRenderingContext()
rv = mContext->CreateRenderingContextInstance(*getter_AddRefs(renderingCtx));
if (NS_SUCCEEDED(rv)) {
#ifndef MOZ_CAIRO_GFX
rv = renderingCtx->Init(mContext, this);
#else
// this should be all MOZ_CAIRO_GFX, but none of the other
// platforms have GetThebesSurface() implemented yet
#if defined(MOZ_CAIRO_GFX) && defined(MOZ_WIDGET_GTK2)
rv = renderingCtx->Init(mContext, GetThebesSurface());
#else
rv = renderingCtx->Init(mContext, this);
#endif
if (NS_SUCCEEDED(rv)) {
nsIRenderingContext *ret = renderingCtx;