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 upDynamically grow the texture cache #3282
Merged
Conversation
This simplifies code, and gives us more flexibility around sizing the shared texture caches (since we can effectively grow/shrink it by units of 1MB rather than 16MB). Differential Revision: https://phabricator.services.mozilla.com/D10852
A big part of this is handling coalescing, so that if we end up creating several new regions in a given frame, we won't allocate/blit/free textures unnecessarily. Differential Revision: https://phabricator.services.mozilla.com/D10853
Aside from general cleanliness, this allows us to factor the selection logic into a helper without a widely-scoped mutable borrow on the entire TextureCache. Differential Revision: https://phabricator.services.mozilla.com/D10854
This is a strict improvement over the status quo, though we'll still eventually consume as much memory as before, since we don't try to evict at all until we hit the max size. We'll fix that soon, but it's worth landing this separately because: * It's useful to separate out regressions in the growing logic from in any new complex eviction logic. * This patch alone is a very large (~100MB) win on AWSY. Differential Revision: https://phabricator.services.mozilla.com/D10855
|
@bors-servo r=gw3583 |
|
|
bors-servo
added a commit
that referenced
this pull request
Nov 7, 2018
Dynamically grow the texture cache https://bugzilla.mozilla.org/show_bug.cgi?id=1495977 <!-- 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/3282) <!-- Reviewable:end -->
|
@staktrace See [1] for reftest annotation adjustments. |
|
|
|
@bors-servo r=gw3583 |
|
|
bors-servo
added a commit
that referenced
this pull request
Nov 7, 2018
Dynamically grow the texture cache https://bugzilla.mozilla.org/show_bug.cgi?id=1495977 <!-- 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/3282) <!-- Reviewable:end -->
|
|
This was referenced Nov 7, 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 6, 2018
•
edited by larsbergstrom
https://bugzilla.mozilla.org/show_bug.cgi?id=1495977
This change is