mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 22:30:22 +00:00
Avoid computing the same thing twice
Trivial cleanup.
This commit is contained in:
parent
552998868d
commit
767bf1b3fd
@ -301,10 +301,7 @@ gtk_css_style_snapshot_icon_texture (GtkCssStyle *style,
|
|||||||
|
|
||||||
if (graphene_matrix_is_identity (&transform_matrix))
|
if (graphene_matrix_is_identity (&transform_matrix))
|
||||||
{
|
{
|
||||||
graphene_rect_init (&bounds,
|
graphene_rect_init (&bounds, 0, 0, width, height);
|
||||||
0, 0,
|
|
||||||
gsk_texture_get_width (texture) / texture_scale,
|
|
||||||
gsk_texture_get_height (texture) / texture_scale);
|
|
||||||
gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
|
gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user