#14771
renderer: upload modified font atlas row bands
Description
This PR reduces font atlas texture uploads by tracking modified row ranges. When possible, it uploads a single full-width band instead of the entire atlas.
The existing implementation already skips uploads when the atlas is unchanged. This change reduces the amount of data uploaded when only part of the atlas has changed.
Implementation
- Keep a ring buffer of the last 64 modifications and combine pending changes into a row band for each reader.
- Track the latest clear or grow generation separately, so readers that missed a reset still receive a full upload even after its history entry has been overwritten.
Result
| Font | Input | packed + cpu apply -> sync |
|---|---|---|
| HiraginoSans-W3 | 日本語 | 7.03 → 1.64 ms |
| PingFangSC-Regular | 簡体字 | 7.45 → 1.64 ms |
| PingFangTC-Regular | 繁体字 | 6.74 → 1.65 ms |
| AppleSDGothicNeo-Regular | ハングル | 7.45 → 1.69 ms |
Activity
1This pull request is a draft
Merging is unavailable until it is marked ready for review.