All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Nikola Pavlica <pavlica.nikola@gmail.com>
Subject: [PULL 05/11] ui/gtk: update monitor interval on egl displays
Date: Fri, 15 Jan 2021 11:24:18 +0100	[thread overview]
Message-ID: <20210115102424.1360437-6-kraxel@redhat.com> (raw)
In-Reply-To: <20210115102424.1360437-1-kraxel@redhat.com>

From: Nikola Pavlica <pavlica.nikola@gmail.com>

When running QEMU's GTK UI without EGL or OGL, the
gd_monitor_update_interval function gets executed and the display refresh
rate gets updated accordingly. However, when using EGL or just regular
OGL, the function never gets executed.

Which is why I decided that the function should be in gd_egl_refresh
where the display output gets updated, in the same vain as how it's done
for normal GTK UIs (aka. those without EGL) - in it's display refresh
function.

Since the gd_monitor_update_interval function now is exposed, we are
going to use it to update the refresh rate.

Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
Message-Id: <20210114140153.301473-3-pavlica.nikola@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk-egl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 99231a3597f5..71c3d698b400 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -113,6 +113,9 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
 {
     VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
 
+    vc->gfx.dcl.update_interval = gd_monitor_update_interval(
+            vc->window ? vc->window : vc->gfx.drawing_area);
+
     if (!vc->gfx.esurface) {
         gd_egl_init(vc);
         if (!vc->gfx.esurface) {
-- 
2.29.2



  parent reply	other threads:[~2021-01-15 10:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 10:24 [PULL 00/11] Ui 20210115 patches Gerd Hoffmann
2021-01-15 10:24 ` [PULL 01/11] ui/gtk: don't try to redefine SI prefixes Gerd Hoffmann
2021-01-15 10:24 ` [PULL 02/11] ui/gtk: rename variable window to widget Gerd Hoffmann
2021-01-15 10:24 ` [PULL 03/11] ui/gtk: limit virtual console max update interval Gerd Hoffmann
2021-01-15 10:24 ` [PULL 04/11] ui/gtk: expose gd_monitor_update_interval Gerd Hoffmann
2021-01-15 10:24 ` Gerd Hoffmann [this message]
2021-01-15 10:24 ` [PULL 06/11] vnc: fix unfinalized tlscreds for VncDisplay Gerd Hoffmann
2021-01-15 10:24 ` [PULL 07/11] ui: add support for remote power control to VNC server Gerd Hoffmann
2021-01-15 10:24 ` [PULL 08/11] vnc: Fix a memleak in vnc_display_connect() Gerd Hoffmann
2021-01-15 10:24 ` [PULL 09/11] vnc: move check into vnc_cursor_define Gerd Hoffmann
2021-01-15 10:24 ` [PULL 10/11] vnc: move initialization to framebuffer_update_request Gerd Hoffmann
2021-01-21 21:22   ` Laszlo Ersek
2021-01-22  2:06     ` Laszlo Ersek
2021-01-22  8:46     ` Gerd Hoffmann
2021-01-22 12:49       ` Laszlo Ersek
2021-01-22 13:42         ` Gerd Hoffmann
2021-01-15 10:24 ` [PULL 11/11] vnc: add support for extended desktop resize Gerd Hoffmann
2021-01-15 20:04 ` [PULL 00/11] Ui 20210115 patches Peter Maydell

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=20210115102424.1360437-6-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=pavlica.nikola@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.