mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
glamor: Free resources when destroying pixmaps.
This commit is contained in:
committed by
Zhigang Gong
parent
16c3b929dd
commit
2fa26c4958
@@ -121,6 +121,13 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
||||
static Bool
|
||||
glamor_destroy_pixmap(PixmapPtr pixmap)
|
||||
{
|
||||
if (pixmap->refcnt == 1) {
|
||||
glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
|
||||
|
||||
glDeleteFramebuffersEXT(1, &pixmap_priv->fb);
|
||||
glDeleteTextures(1, &pixmap_priv->tex);
|
||||
}
|
||||
|
||||
return fbDestroyPixmap(pixmap);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user