glamor: Avoid glamor_create_pixmap for pixmaps backing windows

If the compositing manager uses direct rendering (as is usually the case
these days), the storage of a pixmap allocated by glamor_create_pixmap
needs to be reallocated for sharing it with the compositing manager.
Instead, allocate pixmap storage which can be shared directly.

(Ported from amdgpu commit bf326f2ea19daa6c8da23d6788ff301ae70b8e69)
This commit is contained in:
Michel Dänzer
2019-01-28 18:06:50 +01:00
parent 6d1dfe2523
commit 274703087f

View File

@@ -238,7 +238,7 @@ radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (info->shadow_primary) {
if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP)
return fbCreatePixmap(screen, w, h, depth, usage);
} else {
} else if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
pixmap = glamor_create_pixmap(screen, w, h, depth, usage);
if (pixmap)
return pixmap;