Skip to content

css: Split styles into groups

Matthias Clasen requested to merge css-style-split-2 into master

Introduce refcounted structs for groups of related css properties, and use them to store the style values. Both GtkCssStaticStyle and GtkCssAnimatedStyle fill in the structs in GtkCssStyle, and we can avoid vfuncs for value access, which should be much faster. We can even start accessing style->core->color directly.

This implements an idea that has been discussed on and off for a while:

Here are some numbers:

8535 lookups 	65.20% empty
core          	79.71% shared
background    	79.87% shared
border        	77.63% shared
icon          	89.16% shared
outline       	90.30% shared
font          	89.90% shared
font variant  	99.65% shared
animation     	99.96% shared
transition    	92.51% shared
size          	76.94% shared
other         	97.59% shared

Merge request reports