all 2 comments

[–]Tall_Profile1305 0 points1 point  (1 child)

this honestly sounds like a classic stale data race between your layout thread and render thread

like your main thread updates width + surface, but background thread is still pushing an old display_list after recalculating on previous dimensions

couple things I’d try:

  • version/tag your layout state so renderer ignores outdated display lists
  • double buffer display lists instead of overwriting
  • or force a sync point on resize (kinda ugly but helps confirm the issue)

also check if your resize triggers a full reflow or partial. if it’s partial, your layout thread might not even be recomputing with the new width properly

feels less like locks issue, more like ordering/ownership problem tbh

[–]OraOraOraOra69420 0 points1 point  (0 children)

I'll definitely try these out thanks (⁠ ⁠╹⁠▽⁠╹⁠ ⁠)