xwayland/eglstream: Do not commit without surface
The EGL surface for the xwl_pixmap is created once the stream is ready and valid. If the pixmap's EGL surface fails, for whatever reason, the xwl_pixmap will be unusable and will end up as an invalid wl_buffer. Make sure we do not allow commits in that case and recreate the xwl_pixmap/stream. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
This commit is contained in:
parent
bee2ebb29f
commit
098e0f52c0
|
@ -670,7 +670,14 @@ xwl_glamor_eglstream_allow_commits(struct xwl_window *xwl_window)
|
|||
|
||||
return FALSE;
|
||||
} else {
|
||||
if (xwl_pixmap->surface != EGL_NO_SURFACE)
|
||||
return TRUE;
|
||||
|
||||
/* The pending stream got removed, we have a xwl_pixmap and
|
||||
* yet we do not have a surface.
|
||||
* So something went wrong with the surface creation, retry.
|
||||
*/
|
||||
xwl_eglstream_destroy_pixmap_stream(xwl_pixmap);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user