From a2a8d382e38fdee65adb91ce7b4e6fb280389c8f Mon Sep 17 00:00:00 2001 From: Dennis Tsiang Date: Wed, 1 Sep 2021 14:46:44 +0100 Subject: [PATCH] gl-renderer: Don't require buffer age when using partial update EGL_KHR_partial_update can be implemented independently of EGL_EXT_buffer_age so we handle each case seperately. Signed-off-by: Ben Davis Signed-off-by: Dennis Tsiang --- libweston/renderer-gl/gl-renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index eb056ae3..477d3317 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1403,7 +1403,7 @@ output_get_damage(struct weston_output *output, EGLBoolean ret; int i; - if (gr->has_egl_buffer_age) { + if (gr->has_egl_buffer_age || gr->has_egl_partial_update) { ret = eglQuerySurface(gr->egl_display, go->egl_surface, EGL_BUFFER_AGE_EXT, &buffer_age); if (ret == EGL_FALSE) { @@ -1443,7 +1443,7 @@ output_rotate_damage(struct weston_output *output, struct gl_output_state *go = get_output_state(output); struct gl_renderer *gr = get_renderer(output->compositor); - if (!gr->has_egl_buffer_age) + if (!gr->has_egl_buffer_age && !gr->has_egl_partial_update) return; go->buffer_damage_index += BUFFER_DAMAGE_COUNT - 1;