qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sdl2: redraw correctly when scanout_mode enabled.
@ 2018-07-26 22:59 Tao Wu
  2018-08-01 23:49 ` Tao Wu(吴涛@Eng)
  2018-08-21  5:42 ` Gerd Hoffmann
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Wu @ 2018-07-26 22:59 UTC (permalink / raw)
  To: qemu-devel, kraxel; +Cc: Tao Wu

When scanout_mode enabled, surface is out of sync with actual screen.
In such case, we just call sdl2_gl_scanout_flush to do redraw. This
fixes bug reported in
https://lists.freedesktop.org/archives/virglrenderer-devel/2018-July/001330.html

Signed-off-by: Tao Wu <lepton@google.com>
---
 ui/sdl2-gl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c
index 83b71853d1..1bf4542d8d 100644
--- a/ui/sdl2-gl.c
+++ b/ui/sdl2-gl.c
@@ -124,6 +124,11 @@ void sdl2_gl_redraw(struct sdl2_console *scon)
 {
     assert(scon->opengl);
 
+    if (scon->scanout_mode) {
+        /* sdl2_gl_scanout_flush actually only care about
+         * the first argument. */
+        return sdl2_gl_scanout_flush(&scon->dcl, 0, 0, 0, 0);
+    }
     if (scon->surface) {
         sdl2_gl_render_surface(scon);
     }
-- 
2.18.0.345.g5c9ce644c3-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-21  5:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26 22:59 [Qemu-devel] [PATCH] sdl2: redraw correctly when scanout_mode enabled Tao Wu
2018-08-01 23:49 ` Tao Wu(吴涛@Eng)
2018-08-21  5:42 ` Gerd Hoffmann

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).