summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshotprivate.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2017-01-11 11:41:46 +0100
committerAlexander Larsson <alexl@redhat.com>2017-01-11 11:41:46 +0100
commit6341fab985864cfa337c55cb35e06a7b13119838 (patch)
tree4d9bbf68074d8522a5e8b48b1a69e22cf2b42b73 /gtk/gtksnapshotprivate.h
parentf67ae85b7a33bf1a6a141050d5fc659b0c678d1b (diff)
downloadgtk+-6341fab985864cfa337c55cb35e06a7b13119838.tar.gz
GtkSnapshot: Reuse snapshot state objects
Rather than allocate new ones all the time we reuse the previous ones. We just clear them and save them in the parent for later reuse.
Diffstat (limited to 'gtk/gtksnapshotprivate.h')
-rw-r--r--gtk/gtksnapshotprivate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h
index 31415588ba..2384a8b55f 100644
--- a/gtk/gtksnapshotprivate.h
+++ b/gtk/gtksnapshotprivate.h
@@ -31,6 +31,7 @@ typedef GskRenderNode * (* GtkSnapshotCollectFunc) (GtkSnapshotState *state,
struct _GtkSnapshotState {
GtkSnapshotState *parent;
+ GtkSnapshotState *cached_state; /* A cleared state object we can (re)use */
char *name;
GPtrArray *nodes;