qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@gmail.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel@nongnu.org, "Akihiko Odaki" <akihiko.odaki@gmail.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PATCH 5/6] Revert "ui: associate GL context outside of display listener registration"
Date: Sun, 13 Feb 2022 11:42:21 +0900	[thread overview]
Message-ID: <20220213024222.3548-6-akihiko.odaki@gmail.com> (raw)
In-Reply-To: <20220213024222.3548-1-akihiko.odaki@gmail.com>

This reverts commit ac32b2fff127843355b4f7e7ac9f93dd4a395adf.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 ui/console.c       | 7 ++-----
 ui/egl-headless.c  | 1 -
 ui/gtk.c           | 3 ---
 ui/sdl2.c          | 3 ---
 ui/spice-display.c | 3 ---
 5 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/ui/console.c b/ui/console.c
index 6f21007737e..f3d72655bb6 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1480,11 +1480,8 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
 
     assert(!dcl->ds);
 
-    if (dcl->con && dcl->con->gl &&
-        dcl->con->gl != dcl) {
-        error_report("Display %s is incompatible with the GL context",
-                     dcl->ops->dpy_name);
-        exit(1);
+    if (dcl->ops->dpy_gl_ctx_create) {
+        qemu_console_set_display_gl_ctx(dcl->con, dcl);
     }
 
     if (dcl->con) {
diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index 08327c40c6e..a26a2520c49 100644
--- a/ui/egl-headless.c
+++ b/ui/egl-headless.c
@@ -197,7 +197,6 @@ static void egl_headless_init(DisplayState *ds, DisplayOptions *opts)
         edpy->dcl.con = con;
         edpy->dcl.ops = &egl_ops;
         edpy->gls = qemu_gl_init_shader();
-        qemu_console_set_display_gl_ctx(con, &edpy->dcl);
         register_displaychangelistener(&edpy->dcl);
     }
 }
diff --git a/ui/gtk.c b/ui/gtk.c
index ca29dde6cbd..b31e900ebda 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2112,9 +2112,6 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
     vc->gfx.kbd = qkbd_state_init(con);
     vc->gfx.dcl.con = con;
 
-    if (display_opengl) {
-        qemu_console_set_display_gl_ctx(con, &vc->gfx.dcl);
-    }
     register_displaychangelistener(&vc->gfx.dcl);
 
     gd_connect_vc_gfx_signals(vc);
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 628ae33245f..4117b4ac6e7 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -871,9 +871,6 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
 #endif
         sdl2_console[i].dcl.con = con;
         sdl2_console[i].kbd = qkbd_state_init(con);
-        if (display_opengl) {
-            qemu_console_set_display_gl_ctx(con, &sdl2_console[i].dcl);
-        }
         register_displaychangelistener(&sdl2_console[i].dcl);
 
 #if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_X11)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index bf057bc95f5..07234d49594 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -1158,9 +1158,6 @@ static void qemu_spice_display_init_one(QemuConsole *con)
 
     qemu_spice_create_host_memslot(ssd);
 
-    if (spice_opengl) {
-        qemu_console_set_display_gl_ctx(con, &ssd->dcl);
-    }
     register_displaychangelistener(&ssd->dcl);
 }
 
-- 
2.32.0 (Apple Git-132)



  parent reply	other threads:[~2022-02-13  2:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-13  2:42 [PATCH 0/6] ui/dbus: Share one listener for a console Akihiko Odaki
2022-02-13  2:42 ` [PATCH 1/6] " Akihiko Odaki
2022-02-13  2:42 ` [PATCH 2/6] Revert "console: save current scanout details" Akihiko Odaki
2022-02-13  2:42 ` [PATCH 3/6] Revert "ui: split the GL context in a different object" Akihiko Odaki
2022-02-13  2:42 ` [PATCH 4/6] Revert "ui: dispatch GL events to all listeners" Akihiko Odaki
2022-02-13  2:42 ` Akihiko Odaki [this message]
2022-02-13  2:42 ` [PATCH 6/6] Revert "ui: factor out qemu_console_set_display_gl_ctx()" Akihiko Odaki
2022-02-14 12:06 ` [PATCH 0/6] ui/dbus: Share one listener for a console Marc-André Lureau
2022-02-14 13:15   ` Akihiko Odaki
2022-02-14 19:49     ` Marc-André Lureau
2022-02-15  3:08       ` Akihiko Odaki
2022-02-15 13:32         ` Marc-André Lureau
     [not found]           ` <CAMVc7JWnqucqKeEBDWFES8JYY77gmbMaX-inz+CSzd-bymr5cQ@mail.gmail.com>
     [not found]             ` <CAJ+F1CJ1ZZV-dv6kHhYmAkg5Pnrb_-q7o3Bndo6cQZsYN+RkgA@mail.gmail.com>
2022-02-16 17:05               ` Akihiko Odaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220213024222.3548-6-akihiko.odaki@gmail.com \
    --to=akihiko.odaki@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).