From 118361a085a6be212828fafe1d5f5d63f9caf647 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 11 Mar 2023 00:50:40 +0100 Subject: [PATCH] Fix gtk_snapshot_append_scaled_texture This was doing the wrong thing with transforms. --- gtk/gtksnapshot.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index bca57eaab2..76005769d8 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -2054,16 +2054,13 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, const graphene_rect_t *bounds) { GskRenderNode *node; - graphene_rect_t real_bounds; - float scale_x, scale_y, dx, dy; g_return_if_fail (snapshot != NULL); g_return_if_fail (GDK_IS_TEXTURE (texture)); g_return_if_fail (bounds != NULL); - gtk_snapshot_ensure_affine (snapshot, &scale_x, &scale_y, &dx, &dy); - gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &real_bounds); - node = gsk_texture_scale_node_new (texture, &real_bounds, filter); + gtk_snapshot_ensure_identity (snapshot); + node = gsk_texture_scale_node_new (texture, bounds, filter); gtk_snapshot_append_node_internal (snapshot, node); } -- 2.30.2