Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upExpire entries in the shared texture cache before allocating another layer #3293
Conversation
|
@bors-servo r=gw3583 |
|
|
bors-servo
added a commit
that referenced
this pull request
Nov 9, 2018
Expire entries in the shared texture cache before allocating another layer https://bugzilla.mozilla.org/show_bug.cgi?id=1505639 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/3293) <!-- Reviewable:end -->
|
|
This restores non-mac platforms back to the old maximum of 64 layers. Differential Revision: https://phabricator.services.mozilla.com/D11416
This is a bit cleaner and avoids borrow checking problems. Differential Revision: https://phabricator.services.mozilla.com/D11271
The container struct reduces repetition, and the helper method will simplify future work by allowing early returns. Differential Revision: https://phabricator.services.mozilla.com/D11272
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. Differential Revision: https://phabricator.services.mozilla.com/D11273
We need this so that we can have a detail-less enum called EntryKind to eliminate the boolean. People on #servo agreed this was an appropriate naming strategy.
|
@bors-servo r=gw3583 |
|
|
bors-servo
added a commit
that referenced
this pull request
Nov 9, 2018
Expire entries in the shared texture cache before allocating another layer https://bugzilla.mozilla.org/show_bug.cgi?id=1505639 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/3293) <!-- Reviewable:end -->
|
|
This was referenced Nov 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
bholley commentedNov 9, 2018
•
edited by larsbergstrom
https://bugzilla.mozilla.org/show_bug.cgi?id=1505639
This change is