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/gtksnapshotprivate.h | |
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/gtksnapshotprivate.h')
-rw-r--r-- | gtk/gtksnapshotprivate.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h index 2384a8b55f..91d1b66ef6 100644 --- a/gtk/gtksnapshotprivate.h +++ b/gtk/gtksnapshotprivate.h @@ -37,8 +37,8 @@ struct _GtkSnapshotState { GPtrArray *nodes; cairo_region_t *clip_region; - double translate_x; - double translate_y; + int translate_x; + int translate_y; GtkSnapshotCollectFunc collect_func; union { |