mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl
If guest fb is backed by dmabuf (blob-resource), the texture bound to the
old context needs to be recreated in case the egl is re-initialized (e.g.
new window for vc is created in case of detaching/reattaching of the tab)
v2: call egl_dmabuf_release_texutre instead of putting 0 to dmabuf->texture
(Vivek Kasireddy)
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Dongwon Kim <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
This commit is contained in:
1 parent
01eb4749f0
commit
4872a023a5
1 file changed
+4
@@ -155,6 +155,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
|
||||
surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
|
||||
surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
|
||||
}
|
||||
if (vc->gfx.guest_fb.dmabuf) {
|
||||
egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
|
||||
gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
|
||||
}
|
||||
}
|
||||
|
||||
graphic_hw_update(dcl->con);
|
||||
|
||||
Reference in new issue
Block a user