diff options
author | Alexander Larsson <alexl@redhat.com> | 2017-01-11 16:14:03 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2017-01-11 16:14:03 +0100 |
commit | c00f8dce9f8076e3e914210dda62e7fd2207d1e4 (patch) | |
tree | 016ec44ab7b6eea3a595c8f2cdebe3ddb7d1196a /gtk/gtkcssshadowvalue.c | |
parent | 275185d4157f40def0ec34c98058a98c4b98382f (diff) | |
download | gtk+-c00f8dce9f8076e3e914210dda62e7fd2207d1e4.tar.gz |
GtkSnapshot: Always use int for the translationwip/alexl/snapshot-int-translate
We already take ints when setting the translation, so it can't
currently take any other values. Additionally, I was seeing large
costs in int -> double -> int for the rects in
gtk_snapshot_clips_rect(), as all callers really are ints (widget
allocations) and the clip region is int-based.
This change completely cleared a 2% rectangle_init_from_graphene from
the profile and is likely to have nice performance effects elsewhere
too.
Diffstat (limited to 'gtk/gtkcssshadowvalue.c')
-rw-r--r-- | gtk/gtkcssshadowvalue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c index 1be9708159..ed56504166 100644 --- a/gtk/gtkcssshadowvalue.c +++ b/gtk/gtkcssshadowvalue.c @@ -1039,7 +1039,7 @@ gtk_css_shadow_value_snapshot_outset (const GtkCssValue *shadow, { GskRoundedRect outline; GskRenderNode *node; - double off_x, off_y; + int off_x, off_y; g_return_if_fail (shadow->class == >K_CSS_VALUE_SHADOW); @@ -1070,7 +1070,7 @@ gtk_css_shadow_value_snapshot_inset (const GtkCssValue *shadow, { GskRoundedRect outline; GskRenderNode *node; - double off_x, off_y; + int off_x, off_y; g_return_if_fail (shadow->class == >K_CSS_VALUE_SHADOW); |