Adds a notion of empty cache items in the texture cache, that are not uploaded into textures but have a cache entry and expire like other types of entries. The motivation for this is to avoid continuously requesting invalid glyphs to be re-rasterized. Currently if a page contains invalid glyphs we gracefully fail to reasterize it but since we don't keep a trace of it in the cache it appears new each frame which cause us to schedule work on the rayon thread pool every frame at great costs.
Details
Details
- Reviewers
gw - Commits
- rMOZILLACENTRAL0112c670bd65: Bug 1595768 - Keep empty items in the texture cache. r=gw
- Bugzilla Bug ID
- 1595768
Diff Detail
Diff Detail
- Repository
- rMOZILLACENTRAL mozilla-central
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
It seems a little odd to have the concept in the texture cache. It feels like maybe this should be handled at the font level?
Comment Actions
It's a bit odd because the texture cache deals with both storage and eviction of the items and we only need the latter here, but duplicating the code that manages eviction just for empty items turned out worse, so in my opinion this is better. We could split the texture cache into the two things to make things a little cleaner.