[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 8/9] ui/gtk: skip drawing if any of ctx/surface/image don't e
From: |
Dongwon Kim |
Subject: |
[RFC PATCH 8/9] ui/gtk: skip drawing if any of ctx/surface/image don't exist |
Date: |
Tue, 20 Jun 2023 17:43:54 -0700 |
Rendering of scanout could be skipped if ctx/surface/image don't
exist due to an asynchronous event such as monitors being disconnected.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk-egl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index aa22ebbd98..8eae2b4b1f 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -106,6 +106,11 @@ void gd_egl_draw(VirtualConsole *vc)
if (!vc->gfx.ds) {
return;
}
+
+ if (!vc->gfx.esurface || !vc->gfx.ectx || !vc->gfx.ds->image) {
+ return;
+ }
+
eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
vc->gfx.esurface, vc->gfx.ectx);
--
2.34.1
- [RFC PATCH 0/9] ui: guest displays multiple connectors suppport and hotplug in, Dongwon Kim, 2023/06/20
- [RFC PATCH 1/9] ui/gtk: skip drawing guest scanout when associated VC is invisible, Dongwon Kim, 2023/06/20
- [RFC PATCH 3/9] ui/gtk: reset visible flag when window is minimized, Dongwon Kim, 2023/06/20
- [RFC PATCH 2/9] ui/gtk: set the ui size to 0 when invisible, Dongwon Kim, 2023/06/20
- [RFC PATCH 4/9] ui/gtk: Disable the scanout when a detached tab is closed, Dongwon Kim, 2023/06/20
- [RFC PATCH 5/9] ui/gtk: Factor out tab window creation into a separate function, Dongwon Kim, 2023/06/20
- [RFC PATCH 7/9] ui/gtk: unblock gl if draw submitted already or fence is not yet signaled, Dongwon Kim, 2023/06/20
- [RFC PATCH 6/9] ui/gtk: Add a new parameter to assign connectors/monitors to GFX VCs, Dongwon Kim, 2023/06/20
- [RFC PATCH 8/9] ui/gtk: skip drawing if any of ctx/surface/image don't exist,
Dongwon Kim <=
- [RFC PATCH 9/9] ui/gtk: skip refresh/rendering if VC is invisible, Dongwon Kim, 2023/06/20