backends: Check that buffer age is available when checking damage history

This used to be the case before the refactor at commit 43cee4b6b6,
use_clipped_redraw would be unset before the larger check if has_buffer_age
was set, but clutter_damage_history_is_age_valid() was FALSE. This got
replaced by a check just on the latter, which will also be FALSE if
has_buffer_age is not present.

We have other means to achieve clipped redraws, so this slight change
culled all of them.

Fixes: 43cee4b6b6 ("stage-impl: Do clipped redraws when drawing offscreen")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2771
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3221>
This commit is contained in:
Carlos Garnacho 2023-08-29 11:21:50 +02:00
parent 70a987f7e7
commit 7d8d7c89d4

View File

@ -475,7 +475,7 @@ should_use_clipped_redraw (gboolean is_full_redraw,
if (COGL_IS_OFFSCREEN (framebuffer))
return TRUE;
if (!buffer_has_valid_damage_history)
if (has_buffer_age && !buffer_has_valid_damage_history)
{
meta_topic (META_DEBUG_BACKEND,
"Invalid back buffer age: forcing full redraw");