summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshotprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-13 00:11:06 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-20 18:01:10 +0100
commit67fb129ed7db377bd179757a77514c9ce0d3557f (patch)
treec4e1edd4635e05e8f2064a3f6433ed232fd9d94c /gtk/gtksnapshotprivate.h
parent19753062c4e593507472638ae8a3bc0bd435e6f2 (diff)
downloadgtk+-67fb129ed7db377bd179757a77514c9ce0d3557f.tar.gz
gsk: gsk_render_node_set_transform() => GskTransformNode
Instead of having a setter for the transform, have a GskTransformNode. Most of the oprations that GTK does do not require a transform, so it doesn't make sense to have it as a primary attribute. Also, changing the transform requires updating the uniforms of the GL renderer, so we're happy if we can avoid that.
Diffstat (limited to 'gtk/gtksnapshotprivate.h')
-rw-r--r--gtk/gtksnapshotprivate.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h
index 2f7096287f..74fbf9f5f8 100644
--- a/gtk/gtksnapshotprivate.h
+++ b/gtk/gtksnapshotprivate.h
@@ -29,9 +29,8 @@ struct _GtkSnapshotState {
GskRenderNode *node;
- graphene_matrix_t transform;
- graphene_matrix_t world_transform;
- guint world_is_valid : 1;
+ double translate_x;
+ double translate_y;
};
struct _GtkSnapshot {
@@ -49,12 +48,6 @@ void gtk_snapshot_init (GtkSnapshot *state,
...) G_GNUC_PRINTF (4, 5);
GskRenderNode * gtk_snapshot_finish (GtkSnapshot *state);
-static inline const graphene_matrix_t *
-gtk_snapshot_get_transform (const GtkSnapshot *snapshot)
-{
- return &snapshot->state->transform;
-}
-
G_END_DECLS
#endif /* __GTK_SNAPSHOT_PRIVATE_H__ */