forked from AuroraMiddleware/gtk
cssnode: Special-case TIMESTAMP invalidations
Only invalidate timestamps if the node is marked as invalid. We overload the meaning of "invalid" as "tracks timestamps". While I don't like the way this is written, it is an important optimization because 95+% of nodes don't animate so timestamps don't matter to them. But timestamps are invalidated 60x per second.
This commit is contained in:
parent
68b8f792d6
commit
d9727290cf
@ -860,6 +860,12 @@ void
|
||||
gtk_css_node_invalidate (GtkCssNode *cssnode,
|
||||
GtkCssChange change)
|
||||
{
|
||||
if (!cssnode->invalid)
|
||||
change &= ~GTK_CSS_CHANGE_TIMESTAMP;
|
||||
|
||||
if (change == 0)
|
||||
return;
|
||||
|
||||
cssnode->pending_changes |= change;
|
||||
|
||||
GTK_CSS_NODE_GET_CLASS (cssnode)->invalidate (cssnode);
|
||||
|
Loading…
Reference in New Issue
Block a user