[gtk+] stack: Build stored render node with custom Snapshot object
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stack: Build stored render node with custom Snapshot object
- Date: Fri, 13 Jan 2017 02:38:53 +0000 (UTC)
commit 4668e6dc63490e992f0159358c76060a4e6f10bc
Author: Benjamin Otte <otte redhat com>
Date: Thu Jan 12 22:49:53 2017 +0100
stack: Build stored render node with custom Snapshot object
This is in preparation for API changes in GtkSnapshot.
gtk/gtkstack.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index b1448f2..0e4e463 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -2093,11 +2093,17 @@ gtk_stack_render (GtkCssGadget *gadget,
if (priv->last_visible_node == NULL &&
priv->last_visible_child != NULL)
{
+ GtkSnapshot last_visible_snapshot;
+
gtk_widget_get_allocation (priv->last_visible_child->widget,
&priv->last_visible_surface_allocation);
- gtk_snapshot_push (snapshot, FALSE, "StackCaptureLastVisibleChild");
- gtk_widget_snapshot (priv->last_visible_child->widget, snapshot);
- priv->last_visible_node = gtk_snapshot_pop (snapshot);
+ gtk_snapshot_init (&last_visible_snapshot,
+ gtk_snapshot_get_renderer (snapshot),
+ snapshot->record_names,
+ NULL,
+ "StackCaptureLastVisibleChild");
+ gtk_widget_snapshot (priv->last_visible_child->widget, &last_visible_snapshot);
+ priv->last_visible_node = gtk_snapshot_finish (&last_visible_snapshot);
}
gtk_snapshot_push_clip (snapshot,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]