make gfx/src/cairo build. NPOB.

This commit is contained in:
cbiesinger%web.de 2005-04-11 22:35:37 +00:00
Родитель 4e41c17bcf
Коммит c451a7a098
8 изменённых файлов: 26 добавлений и 16 удалений

Просмотреть файл

@ -98,13 +98,21 @@ EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_JS_LIBS) \
$(TK_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
ifdef MOZ_ENABLE_GTK2
EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS) $(MOZ_XFT_LIBS) $(MOZ_GTK2_LIBS)
CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_XFT_CFLAGS) $(MOZ_GTK2_CFLAGS) -DMOZ_ENABLE_GTK2 -DMOZ_ENABLE_XFT
CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_XFT_CFLAGS) $(MOZ_GTK2_CFLAGS) -DMOZ_ENABLE_GTK2 -DMOZ_ENABLE_XFT
CXXFLAGS += $(TK_CFLAGS)
CFLAGS += $(TK_CFLAGS)
ifdef MOZ_ENABLE_XFT
CXXFLAGS += $(MOZ_XFT_CFLAGS)
CFLAGS += $(MOZ_XFT_CFLAGS)
EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS)
endif
ifdef MOZ_ENABLE_GTK2
DEFINES += -DMOZ_ENABLE_GTK2
endif

Просмотреть файл

@ -937,7 +937,7 @@ xlfd_from_pango_font_description(GtkWidget *aWidget,
PangoXSubfont *subfont_ids;
PangoFontMap *fontmap;
int *subfont_charsets, i, count = 0;
char *tmp, *subfont;
char *subfont;
char *encodings[] = {
"ascii-0",
"big5-0",

Просмотреть файл

@ -46,6 +46,9 @@
#include "nsDeviceContext.h"
#include <cairo.h>
#ifdef MOZ_X11
#include <cairo-xlib.h>
#endif
#ifdef MOZ_ENABLE_XLIB
#include "xlibrgb.h"

Просмотреть файл

@ -220,6 +220,7 @@ nsCairoDrawingSurface::Lock (PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 a
NS_ASSERTION(aY + aHeight <= mHeight, "Invalid aY/aHeight");
NS_ASSERTION(mLockFlags == 0, "nsCairoDrawingSurface::Lock while surface is already locked!");
#if 0
if (!mFastAccess) {
mImageSurface = cairo_surface_get_image (mSurface);
}
@ -238,13 +239,13 @@ nsCairoDrawingSurface::Lock (PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 a
}
return NS_ERROR_FAILURE;
}
*aBits = data + (stride * aY) + (aX * (depth / 8));
*aStride = stride;
*aWidthBytes = width * (depth / 8);
mLockFlags = 0;
#endif
return NS_OK;
}
@ -260,7 +261,7 @@ nsCairoDrawingSurface::Unlock (void)
if (mLockFlags & NS_LOCK_SURFACE_WRITE_ONLY) {
/* need to copy back */
cairo_surface_set_image (mSurface, mImageSurface);
//cairo_surface_set_image (mSurface, mImageSurface);
}
cairo_surface_destroy (mImageSurface);

Просмотреть файл

@ -65,7 +65,7 @@ nsCairoImage::~nsCairoImage()
nsMemory::Free(mImageSurfaceAlpha);
}
NS_IMPL_ISUPPORTS1(nsCairoImage, nsIImage);
NS_IMPL_ISUPPORTS1(nsCairoImage, nsIImage)
//////////////////////////////////////////////
//// nsIImage

Просмотреть файл

@ -739,7 +739,6 @@ nsCairoRenderingContext::CopyOffScreenBits(nsIDrawingSurface *aSrcSurf,
PRUint32 aCopyFlags)
{
nsCairoDrawingSurface *cds = (nsCairoDrawingSurface *) aSrcSurf;
cairo_surface_t *src = cds->GetCairoSurface();
fprintf (stderr, "***** nsCairoRenderingContext::CopyOffScreenBits: [%p] %d,%d -> %d,%d %dx%d\n",
aSrcSurf, aSrcX, aSrcY, aDestBounds.x, aDestBounds.y, aDestBounds.width, aDestBounds.height);
@ -1012,7 +1011,7 @@ nsCairoRenderingContext::SetFont(const nsFont& aFont, nsIAtom* aLangGroup)
NS_IMETHODIMP
nsCairoRenderingContext::SetFont(nsIFontMetrics *aFontMetrics)
{
mFontMetrics = aFontMetrics;
mFontMetrics = NS_STATIC_CAST(nsICairoFontMetrics*, aFontMetrics);
return NS_OK;
}
@ -1186,7 +1185,7 @@ nsCairoRenderingContext::DrawString(const nsString& aString,
}
NS_IMETHODIMP
nsCairoRenderingContext:: RenderPostScriptDataFragment(const unsigned char *psdata, unsigned long psdatalen)
nsCairoRenderingContext::RenderEPS(const nsRect& aRect, FILE *aDataFile)
{
return NS_OK;
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -187,7 +187,6 @@ public:
NS_IMETHOD ReleaseBackbuffer(void);
NS_IMETHOD DestroyCachedBackbuffer(void);
NS_IMETHOD UseBackbuffer(PRBool* aUseBackbuffer);
NS_IMETHOD RenderPostScriptDataFragment(const unsigned char *psdata, unsigned long psdatalen);
#ifdef MOZ_MATHML
NS_IMETHOD GetBoundingMetrics(const char* aString, PRUint32 aLength, nsBoundingMetrics& aBoundingMetrics);
NS_IMETHOD GetBoundingMetrics(const PRUnichar* aString, PRUint32 aLength,
@ -205,6 +204,8 @@ public:
NS_IMETHOD SetRightToLeftText(PRBool aIsRTL) { return NS_OK; }
NS_IMETHOD RenderEPS(const nsRect& aRect, FILE *aDataFile);
// Cairo specific stuff
cairo_t *GetCairo() { return mCairo; }

Просмотреть файл

@ -348,8 +348,6 @@ nsFontMetricsXft::nsFontMetricsXft(): mMiniFont(nsnull)
nsFontMetricsXft::~nsFontMetricsXft()
{
delete mFont;
if (mDeviceContext)
mDeviceContext->FontMetricsDeleted(this);