[gtk+/wip/cssnode3: 63/88] cssnode: Remove timestamp from gtk_css_node_validate()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssnode3: 63/88] cssnode: Remove timestamp from gtk_css_node_validate()
- Date: Thu, 5 Mar 2015 19:56:07 +0000 (UTC)
commit 403e5bd516403ae6c10ff199c805cae8d9dbbaa2
Author: Benjamin Otte <otte redhat com>
Date: Fri Feb 20 17:28:23 2015 +0100
cssnode: Remove timestamp from gtk_css_node_validate()
GtkCssNode knows its own timestamp.
gtk/gtkcontainer.c | 3 +--
gtk/gtkcssnode.c | 16 +++++++++++++---
gtk/gtkcssnodeprivate.h | 3 +--
gtk/gtkwindow.c | 3 +--
4 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 306ecf4..3fcc221 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1847,8 +1847,7 @@ gtk_container_idle_sizer (GdkFrameClock *clock,
if (container->priv->restyle_pending)
{
container->priv->restyle_pending = FALSE;
- gtk_css_node_validate (gtk_widget_get_css_node (GTK_WIDGET (container)),
- gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (GTK_WIDGET
(container))));
+ gtk_css_node_validate (gtk_widget_get_css_node (GTK_WIDGET (container)));
}
/* we may be invoked with a container_resize_queue of NULL, because
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 3de1b6f..cb2b43d 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -824,8 +824,8 @@ gtk_css_node_invalidate (GtkCssNode *cssnode,
}
void
-gtk_css_node_validate (GtkCssNode *cssnode,
- gint64 timestamp)
+gtk_css_node_validate_internal (GtkCssNode *cssnode,
+ gint64 timestamp)
{
GtkCssNode *child;
GtkCssStyle *new_style;
@@ -873,10 +873,20 @@ gtk_css_node_validate (GtkCssNode *cssnode,
child = gtk_css_node_get_next_sibling (child))
{
if (child->visible)
- gtk_css_node_validate (child, timestamp);
+ gtk_css_node_validate_internal (child, timestamp);
}
}
+void
+gtk_css_node_validate (GtkCssNode *cssnode)
+{
+ gint64 timestamp;
+
+ timestamp = gtk_css_node_get_timestamp (cssnode);
+
+ gtk_css_node_validate_internal (cssnode, timestamp);
+}
+
gboolean
gtk_css_node_init_matcher (GtkCssNode *cssnode,
GtkCssMatcher *matcher)
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index 4101037..38cd36d 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -148,8 +148,7 @@ void gtk_css_node_invalidate_frame_clock
gboolean just_timestamp);
void gtk_css_node_invalidate (GtkCssNode *cssnode,
GtkCssChange change);
-void gtk_css_node_validate (GtkCssNode *cssnode,
- gint64 timestamp);
+void gtk_css_node_validate (GtkCssNode *cssnode);
void gtk_css_node_set_invalid (GtkCssNode *node,
gboolean invalid);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index edb54ff..16fa332 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5788,8 +5788,7 @@ gtk_window_show (GtkWidget *widget)
need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
- gtk_css_node_validate (gtk_widget_get_css_node (widget),
- g_get_monotonic_time ());
+ gtk_css_node_validate (gtk_widget_get_css_node (widget));
if (need_resize)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]