diff options
author | Timm Bäder <mail@baedert.org> | 2017-10-01 14:28:11 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-10-02 14:34:47 +0200 |
commit | f5297e6f4b9a3b4ff01f083c87e2637481490fc2 (patch) | |
tree | 718dff9c87a55e680e181215261e3015c42f2e27 /gtk/gtksnapshotprivate.h | |
parent | 8e59b3b387791ad8a40710956217c71c2e06f818 (diff) | |
download | gtk+-f5297e6f4b9a3b4ff01f083c87e2637481490fc2.tar.gz |
snapshot: Use one GPtrArray for all nodes
Instead of creating one GPtrArray per GtkSnapshotState and saving nodes
in there, create one GPtrArray per snapshot and assign a
start_node_index to every GtkSnapshotState as well as a n_nodes variable
so every state knows which nodes belong to it.
Diffstat (limited to 'gtk/gtksnapshotprivate.h')
-rw-r--r-- | gtk/gtksnapshotprivate.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h index c9293765a6..1319df7d7b 100644 --- a/gtk/gtksnapshotprivate.h +++ b/gtk/gtksnapshotprivate.h @@ -32,7 +32,8 @@ typedef GskRenderNode * (* GtkSnapshotCollectFunc) (GtkSnapshot *snapshot, struct _GtkSnapshotState { char *name; - GPtrArray *nodes; + guint start_node_index; + guint n_nodes; cairo_region_t *clip_region; int translate_x; @@ -83,6 +84,7 @@ struct _GtkSnapshot { gboolean record_names; GskRenderer *renderer; GArray *state_stack; + GPtrArray *nodes; }; void gtk_snapshot_init (GtkSnapshot *state, |