summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshotprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-17 03:31:15 +0100
committerBenjamin Otte <otte@redhat.com>2016-11-17 03:33:50 +0100
commitab60cbd86a852121a7181275a45545070d06f6a6 (patch)
tree5ce1ce16467fcb31983d60526f31e2e385be2359 /gtk/gtksnapshotprivate.h
parent28b32d336f8ce3a36f4930cc3dd991264adc213a (diff)
downloadgtk+-ab60cbd86a852121a7181275a45545070d06f6a6.tar.gz
snapshot: Implement gtk_snapshot_clips_rect()
And use this to cull widgets and gadgets that are completely outside the clip region. A potential optimization is to apply this clip region to cairo contexts created with gtk_snapshot_append_cairo_node(), but for that we'd need to apply the inverse matrix to the clip region, and that causes rounding errors. Plus, I hope that cairo drawing becomes exceedingly rare so it won't be used for the whole widget factory like today (which might also explain why no culling happens in the widget factory outside the header bar.
Diffstat (limited to 'gtk/gtksnapshotprivate.h')
-rw-r--r--gtk/gtksnapshotprivate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h
index c9899d004f..ff9d1b62c0 100644
--- a/gtk/gtksnapshotprivate.h
+++ b/gtk/gtksnapshotprivate.h
@@ -30,6 +30,8 @@ struct _GtkSnapshotState {
GskRenderNode *node;
graphene_matrix_t transform;
+ graphene_matrix_t world_transform;
+ guint world_is_valid : 1;
};
struct _GtkSnapshot {