gl-renderer: Don't use eglSetDamageRegion() on surfaceless outputs

eglSetDamageRegion() requires a postable surface and shouldn't be
called with EGL_NO_SURFACE.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2024-07-26 13:24:07 +02:00 committed by Daniel Stone
parent 003e529d46
commit 215d552ce1
1 changed files with 3 additions and 1 deletions

View File

@ -2348,7 +2348,9 @@ gl_renderer_repaint_output(struct weston_output *output,
pixman_region32_fini(&undamaged);
}
if (gr->has_egl_partial_update && !gr->debug_clear) {
if (gr->has_egl_partial_update &&
go->egl_surface != EGL_NO_SURFACE &&
!gr->debug_clear) {
int n_egl_rects;
EGLint *egl_rects;