[gtk/wip/otte/css: 10/17] cssnode: Don't invalidate the parent changes unless necessary
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/css: 10/17] cssnode: Don't invalidate the parent changes unless necessary
- Date: Mon, 10 Feb 2020 03:02:17 +0000 (UTC)
commit 325ae1113ffca0f9814cd5f6572960197540ba1b
Author: Benjamin Otte <otte redhat com>
Date: Sun Feb 9 22:10:39 2020 +0100
cssnode: Don't invalidate the parent changes unless necessary
If old_parent == new_parent, GTK_CSS_CHANGE_ANY_PARENT doesn't need to
be emitted.
gtk/gtkcssnode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 4c37da7d04..43396d93bd 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -754,7 +754,8 @@ gtk_css_node_reposition (GtkCssNode *node,
if (gtk_css_node_get_style_provider_or_null (node) == NULL)
gtk_css_node_invalidate_style_provider (node);
- gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ROOT
+ gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ANY_PARENT
+ | GTK_CSS_CHANGE_ROOT
| GTK_CSS_CHANGE_TIMESTAMP
| GTK_CSS_CHANGE_ANIMATIONS);
@@ -800,8 +801,7 @@ gtk_css_node_reposition (GtkCssNode *node,
gtk_css_node_invalidate_style (node->next_sibling);
}
- gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ANY_PARENT
- | GTK_CSS_CHANGE_ANY_SIBLING
+ gtk_css_node_invalidate (node, GTK_CSS_CHANGE_ANY_SIBLING
| GTK_CSS_CHANGE_NTH_CHILD
| (node->previous_sibling ? 0 : GTK_CSS_CHANGE_FIRST_CHILD)
| (node->next_sibling ? 0 : GTK_CSS_CHANGE_LAST_CHILD));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]