Bug 570625, part 7: Add gfxXlibSurface::ReleasePixmap() to undo TakePixmap(). sr=roc

This commit is contained in:
Chris Jones 2010-09-14 00:23:08 -05:00
Родитель c346eb90b7
Коммит fe90c2afa2
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -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);