You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when you call methods like set_text, set_size, and set_metrics_and_size, cosmic-text will eagerly reshape and relayout the Buffer. This is inefficient if multiple changes occur before the new text layout is required. For instance if both the text and the buffer size change, of if the buffer size changes multiple times within a frame.
I think we ought to change to setting a "dirty" flag (or flags - perhaps we could differentiate between when relayout and reshaping is required) when input parameters change. And then have a methods to relayout/reshape on demand which skip doing work if the flag isn't set.
The text was updated successfully, but these errors were encountered:
Currently when you call methods like
set_text
,set_size
, andset_metrics_and_size
, cosmic-text will eagerly reshape and relayout the Buffer. This is inefficient if multiple changes occur before the new text layout is required. For instance if both the text and the buffer size change, of if the buffer size changes multiple times within a frame.I think we ought to change to setting a "dirty" flag (or flags - perhaps we could differentiate between when relayout and reshaping is required) when input parameters change. And then have a methods to relayout/reshape on demand which skip doing work if the flag isn't set.
The text was updated successfully, but these errors were encountered: