Take all transforms into account

When determining which way is up for the offloaded texture, we
must take all transforms into account - the ones outside the
subsurface node, and the ones inside.
This commit is contained in:
Matthias Clasen 2024-07-10 11:51:42 -04:00 committed by Benjamin Otte
parent e68f58940c
commit 8c988a7b07

View File

@ -667,10 +667,16 @@ complex_clip:
else
{
gboolean has_background;
float sx, sy, dx, dy;
GdkDihedral context_transform;
GdkDihedral inner_transform;
info->texture = find_texture_to_attach (self, node, &info->texture_rect, &info->source_rect, &has_background, &info->transform);
gsk_transform_to_dihedral (transform, &context_transform, &sx, &sy, &dx, &dy);
info->texture = find_texture_to_attach (self, node, &info->texture_rect, &info->source_rect, &has_background, &inner_transform);
if (info->texture)
{
info->transform = gdk_dihedral_combine (context_transform, inner_transform);
info->can_offload = TRUE;
info->can_raise = TRUE;
transform_bounds (self, &info->texture_rect, &info->texture_rect);