Closed Bug 1505639 Opened 6 years ago Closed 6 years ago

expire entries in the shared texture cache before allocating another layer

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bholley, Assigned: bholley)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

In bug 1495977, I made the texture cache grow lazily. This was a big win for windows that didn't have much interaction, but interaction quickly saturates back to the original levels. This is primarily because we don't even try to evict anything up until we hit that limit. So we need to add that. Eventually, we'll also want to add logic to shrink the cache if it's been significantly under-capacity for a while. I have patches to do this as well, but want to tune them more, and so I'm just going to land the first part.
This is a bit cleaner and avoids borrow checking problems.
The container struct reduces repetition, and the helper method will simplify future work by allowing early returns. Depends on D11271
This patch does a few things: * Uses the same age-based expiration that we use for the standalone cache for the shared cache. * Tracks the last time we expired shared entries. * When allocation fails, tries to expire old entries before allocating another layer, assuming we haven't done so just a few frames ago. * Eliminates the size limits on the shared caches, and just grows them instead of allocating standalone entries. The last bit could cause us to get stuck with larger total texture allocations than we do now, if a lot of entries were used in quick succession (since we never drop shared entries like we do with standalone entries). However, I think it's probably unlikely enough that it's fine to ship it for a few days while I finish up shrinking support. The parameters here (75 and 25) still aren't perfect, and I'll tune them going forward. Depends on D11272
This restores non-mac platforms back to the old maximum of 64 layers.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: