summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshot.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2017-01-11 16:14:03 +0100
committerAlexander Larsson <alexl@redhat.com>2017-01-11 16:14:03 +0100
commitc00f8dce9f8076e3e914210dda62e7fd2207d1e4 (patch)
tree016ec44ab7b6eea3a595c8f2cdebe3ddb7d1196a /gtk/gtksnapshot.h
parent275185d4157f40def0ec34c98058a98c4b98382f (diff)
downloadgtk+-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/gtksnapshot.h')
-rw-r--r--gtk/gtksnapshot.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index f03cef7a31..0b691c3486 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -90,8 +90,8 @@ void gtk_snapshot_translate_2d (GtkSnapshot
int y);
GDK_AVAILABLE_IN_3_90
void gtk_snapshot_get_offset (GtkSnapshot *snapshot,
- double *x,
- double *y);
+ int *x,
+ int *y);
GDK_AVAILABLE_IN_3_90
void gtk_snapshot_append_node (GtkSnapshot *snapshot,
@@ -116,7 +116,7 @@ void gtk_snapshot_append_color_node (GtkSnapshot
GDK_AVAILABLE_IN_3_90
gboolean gtk_snapshot_clips_rect (GtkSnapshot *snapshot,
- const graphene_rect_t *bounds);
+ const cairo_rectangle_int_t *bounds);
GDK_AVAILABLE_IN_3_90
void gtk_snapshot_render_background (GtkSnapshot *snapshot,