mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
ui: add a DCLOps callback to check dmabuf support
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-13-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
a7dfbe289e
commit
d0e137bc9a
2 changed files with 15 additions and 0 deletions
13
ui/console.c
13
ui/console.c
|
@ -1463,6 +1463,19 @@ bool console_has_gl(QemuConsole *con)
|
|||
return con->gl != NULL;
|
||||
}
|
||||
|
||||
static bool displaychangelistener_has_dmabuf(DisplayChangeListener *dcl)
|
||||
{
|
||||
if (dcl->ops->dpy_has_dmabuf) {
|
||||
return dcl->ops->dpy_has_dmabuf(dcl);
|
||||
}
|
||||
|
||||
if (dcl->ops->dpy_gl_scanout_dmabuf) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void register_displaychangelistener(DisplayChangeListener *dcl)
|
||||
{
|
||||
static const char nodev[] =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue