diff options
author | Tao Wu | 2018-07-27 00:59:00 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2018-08-24 08:40:10 +0200 |
commit | 77f60fb436ca773ce6f57d37c022ad792445e644 (patch) | |
tree | 2b1a0dd01ef3092a9c9ab136a63a806f02252d3a /ui/sdl2-gl.c | |
parent | ui: use enum to string helpers (diff) | |
download | qemu-77f60fb436ca773ce6f57d37c022ad792445e644.tar.gz qemu-77f60fb436ca773ce6f57d37c022ad792445e644.tar.xz qemu-77f60fb436ca773ce6f57d37c022ad792445e644.zip |
sdl2: redraw correctly when scanout_mode enabled.
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>
Message-id: 20180726225900.180698-1-lepton@google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl2-gl.c')
-rw-r--r-- | ui/sdl2-gl.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |