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 upSync changes from mozilla-central gfx/wr #4011
Merged
Conversation
…batching. r=lsalzman When adding a text run to a batch, we split the text run in to contiguous runs of glyphs which can be batched together. For example, when a glyph is encountered mid-run with a different glyph format or that is cached in a different texture, then it must be batched separately than the preceeding glyphs. However, even though we are only batching sub-runs of glyphs together, we use the entire text run's bounding rect as the bounds we pass to `set_params_and_get_batch()`. This means that each sub-run of glyphs that are batched together will be forced to create an entirely new batch rather than reuse an existing one (because their bounds will definitely overlap.) This can have catastrophic consequences on performance. When the texture cache is full enough that we have allocated a second or greater texture array, then we risk having text runs with glyphs fragmented over different textures. This can easily lead to thousands of draw calls on simple but text-heavy pages. The solution is to calculate the bounds of just the sub-run of glyphs that are being batched together, and use that instead of the text run's bounds. Differential Revision: https://phabricator.services.mozilla.com/D83070 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/5cee93aa5199068b93a13eedd940bf1a3af57011
This should fix a crash caused by an unexpected pixel type. Differential Revision: https://phabricator.services.mozilla.com/D83167 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/1a8c020ebbda30108e22c89da8973f40f8971ae1
…tages. [ghsync] From https://hg.mozilla.org/mozilla-central/rev/3bf657540a15a3d6752f779d25801e9e6d4ccaa0
This should fix a crash caused by an unexpected pixel type. Differential Revision: https://phabricator.services.mozilla.com/D83167 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/b850773b54e129888b8fb2f1e3bc68f528aeccbf
|
@bors-servo r=auto |
|
|
|
|
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.
moz-gfx commentedJul 11, 2020
No description provided.