css: Avoid computing change too often
authorMatthias Clasen <mclasen@redhat.com>
Wed, 15 Jan 2020 07:35:21 +0000 (02:35 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 16 Jan 2020 22:03:51 +0000 (17:03 -0500)
commit789f6f3941bb1a3cc199ae5ebf14b94527c4e22d
treeb5e0e03148318b52a84e8166435ce1dd0355f2d7
parent2c231f4336b9824dffe41211eb776ff63a47240e
css: Avoid computing change too often

Most of the time when styles need to be recreated, the name and classes
of the css node haven't changed. In this case, the change value will not
change either, since we are computing change under the assumption that
name and classes are unchanged.

So don't recompute the change. This avoids the second match we do to
find the superset, cutting down the number of times we consult the
selector tree.
gtk/gtkcssnode.c
gtk/gtkcssstaticstyle.c
gtk/gtkcssstaticstyleprivate.h