mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 08:48:01 +02: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>
(cherry picked from commit 684580d06f)
This commit is contained in:
parent
c69a0527cb
commit
1cb6417f74
1 changed files with 12 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue