Refactor TextLayout to use Rc<RefCell> instead of Arc<Mutex> for improved performance (#27177)

Since `TextLayout` is not shared by multiple threads, changing it to
`Rc<RefCell<T>>` should improve performance.

I also found several codes with the same problem. If you think this
change is beneficial, I will continue to improve it in the subsequent
PR. 🙂

Release Notes:

- N/A
1db621dc50Sunli committed on 3/21/2025, 7:06:22 PM· committed by GitHubparent6143da9
1 file changedLine totals unavailable