summaryrefslogtreecommitdiffstats
path: root/ui/sdl2.c
diff options
context:
space:
mode:
authorPeter Maydell2022-03-15 17:28:50 +0100
committerPeter Maydell2022-03-15 17:28:50 +0100
commite2fb7d8aa218256793df99571d16f92074258447 (patch)
tree013210834bdf41528641e21443bce32980981aa5 /ui/sdl2.c
parentMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (diff)
parentui/console: call gfx_switch() even if the current scanout is GL (diff)
downloadqemu-e2fb7d8aa218256793df99571d16f92074258447.tar.gz
qemu-e2fb7d8aa218256793df99571d16f92074258447.tar.xz
qemu-e2fb7d8aa218256793df99571d16f92074258447.zip
Merge tag 'dbus-pull-request' of gitlab.com:marcandre.lureau/qemu into staging
GL & D-Bus display related fixes Hi, Here are pending fixes related to D-Bus and GL, most of them reported thanks to Akihiko Odaki. # gpg: Signature made Tue 15 Mar 2022 09:36:45 GMT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'dbus-pull-request' of gitlab.com:marcandre.lureau/qemu: ui/console: call gfx_switch() even if the current scanout is GL ui/dbus: do not send 2d scanout until gfx_update ui/dbus: fix texture sharing ui/console: optionally update after gfx switch ui/console: add a dpy_gfx_switch callback helper ui/shader: free associated programs ui/shader: fix potential leak of shader on error ui/console: move console compatibility check to dcl_display_console() ui/dbus: associate the DBusDisplayConsole listener with the given console ui/console: egl-headless is compatible with non-gl listeners ui/console: move dcl compatiblity check to a callback ui/console: move check for compatible GL context Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/sdl2.c')
-rw-r--r--ui/sdl2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 46a252d7d9..d3741f9b75 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -788,8 +788,15 @@ static const DisplayChangeListenerOps dcl_gl_ops = {
.dpy_gl_update = sdl2_gl_scanout_flush,
};
+static bool
+sdl2_gl_is_compatible_dcl(DisplayGLCtx *dgc,
+ DisplayChangeListener *dcl)
+{
+ return dcl->ops == &dcl_gl_ops;
+}
+
static const DisplayGLCtxOps gl_ctx_ops = {
- .compatible_dcl = &dcl_gl_ops,
+ .dpy_gl_ctx_is_compatible_dcl = sdl2_gl_is_compatible_dcl,
.dpy_gl_ctx_create = sdl2_gl_create_context,
.dpy_gl_ctx_destroy = sdl2_gl_destroy_context,
.dpy_gl_ctx_make_current = sdl2_gl_make_context_current,