bevy/crates/bevy_text/src
UkoeHB fa51e26052
Trim cosmic-text's shape run cache (#15037)
# Objective

- Fixes https://github.com/bevyengine/bevy/pull/14991. The `cosmic-text`
shape run cache requires manual cleanup for old text that no longer
needs to be cached.

## Solution

- Add a system to trim the cache.
- Add an `average fps` indicator to the `text_debug` example.

## Testing

Tested with `cargo run --example text_debug`.
- **No shape run cache**: 82fps with ~1fps variance.
- **Shape run cache no trim**: 90-100fps with ~2-4fps variance
- **Shape run cache trim age = 1**: 90-100fps with ~2-8fps variance
- **Shape run cache trim age = 2**: 90-100fps with ~2-4fps variance
- **Shape run cache trim age = 2000**: 80-120fps with ~2-6fps variance

The shape run cache seems to increase average FPS but also increases
frame time variance (when there is dynamic text).
2024-09-10 23:28:05 +00:00
..
bounds.rs Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
error.rs Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
FiraMono-subset.ttf add a default font (#8445) 2023-04-21 22:30:18 +00:00
font_atlas_set.rs Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
font_atlas.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
font_loader.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
font.rs Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
glyph.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
lib.rs Trim cosmic-text's shape run cache (#15037) 2024-09-10 23:28:05 +00:00
pipeline.rs Trim cosmic-text's shape run cache (#15037) 2024-09-10 23:28:05 +00:00
text2d.rs Reuse TextLayoutInfo in queue_text (#14997) 2024-09-02 17:01:56 +00:00
text.rs Remove #[cfg] from the From impls of TextSection (#14439) 2024-07-26 17:11:12 +00:00