mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xwayland: Try the Xwayland glamor hook to create pixmaps
When creating the window buffer's backing pixmap, try the Xwayland glamor hook first and fallback to the regular CreatePixmap() code path otherwise. That allows to enable direct scanout if possible, either through the regular dmabuf v4 code path, or from the implicit fallback code path. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
@@ -328,12 +328,19 @@ xwl_window_buffers_get_pixmap(struct xwl_window *xwl_window,
|
||||
pBox++;
|
||||
}
|
||||
} else {
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
/* Try the xwayland/glamor direct hook first */
|
||||
xwl_window_buffer->pixmap =
|
||||
(*xwl_screen->screen->CreatePixmap) (window_pixmap->drawable.pScreen,
|
||||
window_pixmap->drawable.width,
|
||||
window_pixmap->drawable.height,
|
||||
window_pixmap->drawable.depth,
|
||||
CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
|
||||
xwl_glamor_create_pixmap_for_window(xwl_window);
|
||||
#endif /* XWL_HAS_GLAMOR */
|
||||
if (!xwl_window_buffer->pixmap) {
|
||||
xwl_window_buffer->pixmap =
|
||||
(*xwl_screen->screen->CreatePixmap) (window_pixmap->drawable.pScreen,
|
||||
window_pixmap->drawable.width,
|
||||
window_pixmap->drawable.height,
|
||||
window_pixmap->drawable.depth,
|
||||
CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
|
||||
}
|
||||
|
||||
if (!xwl_window_buffer->pixmap)
|
||||
return window_pixmap;
|
||||
|
||||
Reference in New Issue
Block a user