aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-20 23:45:38 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-15 12:55:02 +0400
commite1c676a254b012779db87166a1f26db6886a8bce (patch)
tree5fa8286250477f77cd490e4686586357a13ba287 /ui
parent2fa2386e38387f592a0abf871eabb16e7a43dcd1 (diff)
downloadqemu-e1c676a254b012779db87166a1f26db6886a8bce.zip
qemu-e1c676a254b012779db87166a1f26db6886a8bce.tar.gz
qemu-e1c676a254b012779db87166a1f26db6886a8bce.tar.bz2
ui/console: call gfx_switch() even if the current scanout is GL
egl-headless depends on the backing surface to be set before texture are set and updated. Display it (update=true) iff the current scanout kind is SURFACE. 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 'ui')
-rw-r--r--ui/console.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/console.c b/ui/console.c
index 3b56645..da434ce 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1114,6 +1114,10 @@ static void displaychangelistener_display_console(DisplayChangeListener *dcl,
return;
}
+ dpy_gfx_create_texture(con, con->surface);
+ displaychangelistener_gfx_switch(dcl, con->surface,
+ con->scanout.kind == SCANOUT_SURFACE);
+
if (con->scanout.kind == SCANOUT_DMABUF &&
displaychangelistener_has_dmabuf(dcl)) {
dcl->ops->dpy_gl_scanout_dmabuf(dcl, con->scanout.dmabuf);
@@ -1128,9 +1132,6 @@ static void displaychangelistener_display_console(DisplayChangeListener *dcl,
con->scanout.texture.y,
con->scanout.texture.width,
con->scanout.texture.height);
- } else if (con->scanout.kind == SCANOUT_SURFACE) {
- dpy_gfx_create_texture(con, con->surface);
- displaychangelistener_gfx_switch(dcl, con->surface, TRUE);
}
}