notpartofthebuild thebes fixes to my fixes, since merging is hard.

This commit is contained in:
vladimir%pobox.com 2005-07-02 01:36:23 +00:00
Родитель 380e5a443f
Коммит eb6f78a4d3
5 изменённых файлов: 11 добавлений и 14 удалений

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

@ -47,13 +47,12 @@ MODULE = gfx
ifdef MOZ_TREE_CAIRO
DIRS = cairo
endif
DIRS += public idl src
ifdef MOZ_ENABLE_CAIRO_GFX
DIRS += thebes
endif
DIRS += public idl src
ifdef ENABLE_TESTS
TOOL_DIRS += tests
endif

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

@ -27,7 +27,7 @@ EXPORTS += gfxWindowsSurface.h
endif
ifeq ($(MOZ_GFX_TOOLKIT),gtk2)
EXPORTS += gfxXlibSurface.h
EXPORTS += gfxXlibSurface.h
endif
include $(topsrcdir)/config/rules.mk

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

@ -50,14 +50,11 @@ public:
cairo_surface_t* CairoSurface() { return mSurface; }
protected:
cairo_surface_t* mSurface;
void Init(cairo_surface_t* surface) {
mDestroyed = PR_FALSE;
mSurface = surface;
}
PRBool mDestroyed;
void Destroy() {
if (mDestroyed) {
NS_WARNING("Calling Destroy on an already-destroyed surface!");
@ -68,11 +65,18 @@ protected:
mDestroyed = PR_TRUE;
}
PRBool Destroyed() {
return mDestroyed;
}
virtual ~gfxASurface() {
if (!mDestroyed) {
NS_WARNING("gfxASurface::~gfxASurface called, but cairo surface was not destroyed! (Did someone forget to call Destroy()?)");
}
}
private:
cairo_surface_t* mSurface;
PRBool mDestroyed;
};
#endif /* GFX_ASURFACE_H */

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

@ -92,12 +92,6 @@ struct gfxPoint {
gfxPoint operator-(const gfxSize& s) const {
return gfxPoint(x - s.width, y - s.height);
}
gfxPoint operator-(const gfxPoint& p) const {
return gfxPoint(x - p.x, y - p.y);
}
gfxPoint operator-(const gfxSize& s) const {
return gfxPoint(x - s.width, y - s.height);
}
gfxPoint operator-() const {
return gfxPoint(- x, - y);
}

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

@ -78,7 +78,7 @@ gfxXlibSurface::gfxXlibSurface(Display* dpy, Visual* visual, unsigned long width
width, height,
DefaultDepth(dpy, DefaultScreen(dpy)));
cairo_surface_t *surf = cairo_xlib_surface_create(dpy, pixmap, visual, width, height);
cairo_surface_t *surf = cairo_xlib_surface_create(dpy, mDrawable, visual, width, height);
Init(surf);
}