qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 12/12] ui/console: call gfx_switch() even if the current s


From: Akihiko Odaki
Subject: Re: [PATCH v3 12/12] ui/console: call gfx_switch() even if the current scanout is GL
Date: Mon, 7 Mar 2022 17:08:56 +0900
User-agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 2022/03/07 16:46, marcandre.lureau@redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau@redhat.com>

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.

egl-headless does not dynamically call register_displaychangelistener and has console associated (console_select would not affect egl-headless itself) so this should not be necessary.

The remaining problem with egl-headless is that egl-headless renders the image to DisplaySurface, and a non-OpenGL display (namely vnc) has to consume it instead of texture even when con->scanout.kind is SCANOUT_TEXTURE or SCANOUT_DMABUF.

Regards,
Akihiko Odaki


Reported-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
  ui/console.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ui/console.c b/ui/console.c
index 5bfecea4549e..16a0b0909ba2 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1112,6 +1112,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);
@@ -1126,9 +1130,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);
      }
  }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]