glamor: use dixDestroyPixmap() instead of direct driver call
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping jungle, so use the proper dix function instead. See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
This commit is contained in:
parent
08ec122fa7
commit
7a0f8301c5
|
@ -436,7 +436,7 @@ glamor_composite_glyphs(CARD8 op,
|
||||||
glyphs_queued = 0;
|
glyphs_queued = 0;
|
||||||
}
|
}
|
||||||
if (glyph_atlas->atlas) {
|
if (glyph_atlas->atlas) {
|
||||||
(*screen->DestroyPixmap)(glyph_atlas->atlas);
|
dixDestroyPixmap(glyph_atlas->atlas, 0);
|
||||||
glyph_atlas->atlas = NULL;
|
glyph_atlas->atlas = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -571,8 +571,7 @@ glamor_free_glyph_atlas(struct glamor_glyph_atlas *atlas)
|
||||||
{
|
{
|
||||||
if (!atlas)
|
if (!atlas)
|
||||||
return;
|
return;
|
||||||
if (atlas->atlas)
|
dixDestroyPixmap(atlas->atlas, 0);
|
||||||
(*atlas->atlas->drawable.pScreen->DestroyPixmap)(atlas->atlas);
|
|
||||||
free (atlas);
|
free (atlas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -346,7 +346,7 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
|
||||||
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
|
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
|
||||||
"Failed to make %dx%dx%dbpp pixmap from GBM bo\n",
|
"Failed to make %dx%dx%dbpp pixmap from GBM bo\n",
|
||||||
width, height, pixmap->drawable.bitsPerPixel);
|
width, height, pixmap->drawable.bitsPerPixel);
|
||||||
screen->DestroyPixmap(exported);
|
dixDestroyPixmap(exported, 0);
|
||||||
gbm_bo_destroy(bo);
|
gbm_bo_destroy(bo);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +367,7 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
|
||||||
/* Swap the devKind into the original pixmap, reflecting the bo's stride */
|
/* Swap the devKind into the original pixmap, reflecting the bo's stride */
|
||||||
screen->ModifyPixmapHeader(pixmap, 0, 0, 0, 0, exported->devKind, NULL);
|
screen->ModifyPixmapHeader(pixmap, 0, 0, 0, 0, exported->devKind, NULL);
|
||||||
|
|
||||||
screen->DestroyPixmap(exported);
|
dixDestroyPixmap(exported, 0);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,7 @@ glamor_pixmap_from_fds(ScreenPtr screen,
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (ret == FALSE) {
|
if (ret == FALSE) {
|
||||||
screen->DestroyPixmap(pixmap);
|
dixDestroyPixmap(pixmap, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pixmap;
|
return pixmap;
|
||||||
|
@ -654,7 +654,7 @@ glamor_pixmap_from_fd(ScreenPtr screen,
|
||||||
stride, depth, bpp);
|
stride, depth, bpp);
|
||||||
|
|
||||||
if (ret == FALSE) {
|
if (ret == FALSE) {
|
||||||
screen->DestroyPixmap(pixmap);
|
dixDestroyPixmap(pixmap, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pixmap;
|
return pixmap;
|
||||||
|
|
Loading…
Reference in New Issue