gtk: fix wrong id between texture and framebuffer
PATCH 1/1 gtk: fix wrong id between texture and framebuffer
From: Anthoine Bourgeois <[email protected]>
The gd_gl_area_scanout_texture must destroy framebuffer if there is no texture id instead of no framebuffer id.
The effect was a black screen with "-vga virtio -display gtk,gl=on" options.
The bug was introduce by a4f113fd "gtk: use framebuffer helper functions."
--- ui/gtk-gl-area.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
ui/gtk-gl-area.c +1 -2
@@ -178,8 +178,7 @@ void gd_gl_area_scanout_texture(DisplayChangeListener *dcl,gtk_gl_area_make_current (GTK_GL_AREA (vc->gfx.drawing_area)); -if (vc->gfx.guest_fb.framebuffer ==0 || - vc->gfx.w ==0 || vc->gfx.h ==0 ) { +if (backing_id ==0 || vc->gfx.w ==0 || vc->gfx.h ==0 ) {gtk_gl_area_set_scanout_mode (vc, false);return ; }
Signature · 1 line
2.9.3
Hi Anthoine,
Cc'ing Gerd Hoffmann who is the maintainer of this file.
See
https://wiki.qemu.org/Contribute/SubmitAPatch#CC_the_relevant_maintainer:
$ ./scripts/get_maintainer.pl -f ui/gtk-gl-area.c Gerd Hoffmann <[email protected]> (odd fixer:Graphics)
Quoted 28 lines · Anthoine Bourgeois
From: Anthoine Bourgeois <[email protected]>
The
gd_gl_area_scanout_texturemust destroy framebuffer if there is no texture id instead of no framebuffer id.
The effect was a black screen with "-vga virtio -display gtk,gl=on" options.
The bug was introduce bya4f113fd"gtk: use framebuffer helper functions."Signed-off-by Anthoine Bourgeois <[email protected]>--- ui/gtk-gl-area.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)ui/gtk-gl-area.c +1
-2@@ -178,8 +178,7 @@ void gd_gl_area_scanout_texture(DisplayChangeListener *dcl,gtk_gl_area_make_current (GTK_GL_AREA (vc->gfx.drawing_area)); -if (vc->gfx.guest_fb.framebuffer ==0 || - vc->gfx.w ==0 || vc->gfx.h ==0 ) { +if (backing_id ==0 || vc->gfx.w ==0 || vc->gfx.h ==0 ) {gtk_gl_area_set_scanout_mode (vc, false);return ; }