mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 07:13:38 +08: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 <kraxel@redhat.com> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Message-Id: <20211104065153.28897-3-dongwon.kim@intel.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
01eb4749f0
commit
4872a023a5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user