diff --git a/gfx/thebes/gfxXlibSurface.h b/gfx/thebes/gfxXlibSurface.h index 688ea8935934..05ba75f6ee92 100644 --- a/gfx/thebes/gfxXlibSurface.h +++ b/gfx/thebes/gfxXlibSurface.h @@ -100,6 +100,15 @@ public: mPixmapTaken = PR_TRUE; } + // Release ownership of this surface's Pixmap. This is only valid + // on gfxXlibSurfaces for which the user called TakePixmap(), or + // on those created by a Create() factory method. + Drawable ReleasePixmap() { + NS_ASSERTION(mPixmapTaken, "I don't own the Pixmap!"); + mPixmapTaken = PR_FALSE; + return mDrawable; + } + // Find a visual and colormap pair suitable for rendering to this surface. PRBool GetColormapAndVisual(Colormap* colormap, Visual **visual);