summaryrefslogtreecommitdiff
path: root/gtk/gtkrendericon.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-08-30 23:22:03 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-08-30 23:30:10 -0400
commit767bf1b3fd4c0ed2aca0de90bf5e702b08b84e76 (patch)
tree1829f1a4ac7c16fa549e8baa540f444bbe1b7413 /gtk/gtkrendericon.c
parent552998868dd7957fc9e4faf15fc5680c21d1b327 (diff)
downloadgtk+-767bf1b3fd4c0ed2aca0de90bf5e702b08b84e76.tar.gz
Avoid computing the same thing twice
Trivial cleanup.
Diffstat (limited to 'gtk/gtkrendericon.c')
-rw-r--r--gtk/gtkrendericon.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c
index ff7eac978e..3ec7a3b562 100644
--- a/gtk/gtkrendericon.c
+++ b/gtk/gtkrendericon.c
@@ -301,10 +301,7 @@ gtk_css_style_snapshot_icon_texture (GtkCssStyle *style,
if (graphene_matrix_is_identity (&transform_matrix))
{
- graphene_rect_init (&bounds,
- 0, 0,
- gsk_texture_get_width (texture) / texture_scale,
- gsk_texture_get_height (texture) / texture_scale);
+ graphene_rect_init (&bounds, 0, 0, width, height);
gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
}
else