X11 needs to be taken out behind the barn and shot, r=me

This commit is contained in:
vladimir@pobox.com 2007-05-10 13:50:16 -07:00
Родитель 26cc7046f6
Коммит c55f2e20ad
3 изменённых файлов: 6 добавлений и 11 удалений

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

@ -100,7 +100,7 @@ nsThebesImage::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequi
#ifdef XP_WIN
if (!ShouldUseImageSurfaces()) {
mWinSurface = new gfxWindowsSurface(gfxIntSize(mWidth, mHeight), format);
if (mWinSurface && mWinSurface->Status() == 0) {
if (mWinSurface && mWinSurface->CairoStatus() == 0) {
// no error
mImageSurface = mWinSurface->GetImageSurface();
}
@ -114,7 +114,7 @@ nsThebesImage::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequi
mImageSurface = new gfxImageSurface(gfxIntSize(mWidth, mHeight), format);
#endif
if (!mImageSurface || mImageSurface->Status()) {
if (!mImageSurface || mImageSurface->CairoStatus()) {
mImageSurface = nsnull;
// guess
return NS_ERROR_OUT_OF_MEMORY;
@ -296,7 +296,7 @@ nsThebesImage::LockImagePixels(PRBool aMaskPixels)
// Recover the pixels
mImageSurface = new gfxImageSurface(gfxIntSize(mWidth, mHeight),
gfxImageSurface::ImageFormatARGB32);
if (!mImageSurface || mImageSurface->Status())
if (!mImageSurface || mImageSurface->CairoStatus())
return NS_ERROR_OUT_OF_MEMORY;
nsRefPtr<gfxContext> context = new gfxContext(mImageSurface);
if (!context) {
@ -474,7 +474,7 @@ nsThebesImage::ThebesDrawTile(gfxContext *thebesContext,
surface = new gfxImageSurface(gfxIntSize(width, height),
gfxASurface::ImageFormatARGB32);
if (!surface || surface->Status()) {
if (!surface || surface->CairoStatus()) {
thebesContext->SetMatrix(savedCTM);
return NS_ERROR_OUT_OF_MEMORY;
}

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

@ -42,9 +42,6 @@
#include "gfxRect.h"
#include "nsStringFwd.h"
// for X11
#undef Status
typedef struct _cairo_surface cairo_surface_t;
typedef struct _cairo_user_data_key cairo_user_data_key_t;
@ -127,7 +124,7 @@ public:
virtual void Finish();
int Status();
int CairoStatus();
/* Make sure that the given dimensions don't overflow a 32-bit signed int
* using 4 bytes per pixel; optionally, make sure that either dimension

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

@ -48,8 +48,6 @@
#ifdef CAIRO_HAS_XLIB_SURFACE
#include "gfxXlibSurface.h"
// X11 really blows, and #define's Status
#undef Status
#endif
#ifdef CAIRO_HAS_QUARTZ_SURFACE
@ -263,7 +261,7 @@ gfxASurface::Finish()
}
int
gfxASurface::Status()
gfxASurface::CairoStatus()
{
if (!mSurfaceValid)
return -1;