Skip to content

clutter/text: Avoid relayout on PangoAttributes changes when possible

Jonas Dreßler requested to merge verdre/mutter:small-clutter-text-opti into master

ClutterText allows setting a custom PangoAttrList, and St uses that to set the text style it's reading from CSS. One style St enforces using this mechanism is the text color and setting the text color should obviously not affect the size of the layout. ClutterText does queue a relayout in that case though because it unconditionally queues a relayout when updating the PangoAttrList.

We can avoid this relayout by reusing an optimization ClutterText has: clutter_text_queue_redraw_or_relayout() will only queue a relayout if the requested size of the layout changed.

Merge request reports