summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorMarc-André Lureau2022-02-17 12:07:21 +0100
committerMarc-André Lureau2022-03-15 09:54:55 +0100
commit589089feee5bf5110f21fd582f9c2c479ae718a2 (patch)
tree2e658edeb5b5abdc5b3dfb9f798d9abb9875afe0 /include/ui
parentui/console: optionally update after gfx switch (diff)
downloadqemu-589089feee5bf5110f21fd582f9c2c479ae718a2.tar.gz
qemu-589089feee5bf5110f21fd582f9c2c479ae718a2.tar.xz
qemu-589089feee5bf5110f21fd582f9c2c479ae718a2.zip
ui/dbus: fix texture sharing
The DBus listener naively create, update and destroy textures without taking into account other listeners. The texture were shared, but texture update was unnecessarily duplicated. Teach DisplayGLCtx to do optionally shared texture handling. This is only implemented for DBus display at this point, however the same infrastructure could potentially be used for other future combinations. Reported-by: Akihiko Odaki <akihiko.odaki@gmail.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/console.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index 18a10c0b7d..0f84861933 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -290,10 +290,20 @@ typedef struct DisplayGLCtxOps {
QEMUGLContext ctx);
int (*dpy_gl_ctx_make_current)(DisplayGLCtx *dgc,
QEMUGLContext ctx);
+ void (*dpy_gl_ctx_create_texture)(DisplayGLCtx *dgc,
+ DisplaySurface *surface);
+ void (*dpy_gl_ctx_destroy_texture)(DisplayGLCtx *dgc,
+ DisplaySurface *surface);
+ void (*dpy_gl_ctx_update_texture)(DisplayGLCtx *dgc,
+ DisplaySurface *surface,
+ int x, int y, int w, int h);
} DisplayGLCtxOps;
struct DisplayGLCtx {
const DisplayGLCtxOps *ops;
+#ifdef CONFIG_OPENGL
+ QemuGLShader *gls; /* optional shared shader */
+#endif
};
DisplayState *init_displaystate(void);