Improve texture atlas utilization and fix glyph corruption when merging#4732
Merged
Tyriar merged 2 commits intoxtermjs:masterfrom Aug 26, 2023
Merged
Improve texture atlas utilization and fix glyph corruption when merging#4732Tyriar merged 2 commits intoxtermjs:masterfrom
Tyriar merged 2 commits intoxtermjs:masterfrom
Conversation
- Changed the threshold at which pages start to merge from MAX/2 to MAX. - If a glyph is about to create a new page that will be merged, check if the existing row fits when ignoring the row pixel threshold. This will improve texture utilization by using the available space before the page is merged and becomes static.
The corruption was caused by confusion with page indexes when merging pages. The fix is to simplify it by deleting all pages and then just adding the new page. Fixes xtermjs#4534 Fixes xtermjs#4351
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pages merged at the bottom of the demo after running CJK test button below
Before:
After:
After the first page doesn't get merged as expected as there aren't many short glyphs: