gl-renderer: Fix clear optimization

This should be checking for a valid transform so it doesn't use corners
of an axis aligned bounding box for free-form transformed views.

It should still check surf_xform for color management, but it should only
do that when surf_xform_valid is true.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-10-15 13:32:57 -05:00
parent 992ab893f9
commit 9700ec3bc4

View file

@ -2076,7 +2076,8 @@ draw_paint_node(struct weston_paint_node *pnode,
}
if (!gr->debug_mode && pnode->draw_solid && pnode->is_fully_opaque &&
pnode->view->alpha == 1.0f && !pnode->surf_xform.transform) {
pnode->view->alpha == 1.0f && pnode->valid_transform &&
(pnode->surf_xform_valid && !pnode->surf_xform.transform)) {
clear_region(gr, pnode, &repaint);
gs->used_in_output_repaint = true;
goto out;