summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshotprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-13 02:33:15 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-20 18:01:10 +0100
commit02131d590e2f4bdf9d2f487e619a3f08c1cf178e (patch)
tree0a2dd4fb6522b9d75ae31b75d6c11fe95fe0c1df /gtk/gtksnapshotprivate.h
parentca80e9decf49acb042984bc07348d2fc93c03997 (diff)
downloadgtk+-02131d590e2f4bdf9d2f487e619a3f08c1cf178e.tar.gz
snapshot: Change how gtk_snapshot_push/pop works
Instead of appending a container node and adding the nodes to it as they come in, we now collect the nodes until gtk_snapshot_pop() is called and then hand them out in a container node. The caller of gtk_snapshot_push() is then responsible for doing whatever he wants with the created node. Another addigion is the keep_coordinates flag to gtk_snapshot_push() which allows callers to keep the current offset and clip region or discard it. Discarding is useful when doing transforms, keeping it is useful when inserting effect nodes (like the ones I'm about to add).
Diffstat (limited to 'gtk/gtksnapshotprivate.h')
-rw-r--r--gtk/gtksnapshotprivate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h
index 54b3a6bbbe..eb8cbacba0 100644
--- a/gtk/gtksnapshotprivate.h
+++ b/gtk/gtksnapshotprivate.h
@@ -27,7 +27,8 @@ typedef struct _GtkSnapshotState GtkSnapshotState;
struct _GtkSnapshotState {
GtkSnapshotState *parent;
- GskRenderNode *node;
+ char *name;
+ GPtrArray *nodes;
cairo_region_t *clip_region;
double translate_x;
@@ -37,7 +38,6 @@ struct _GtkSnapshotState {
struct _GtkSnapshot {
GtkSnapshotState *state;
- GskRenderNode *root;
GskRenderer *renderer;
};