-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of scrollbar marks (#16006)
This replaces the use of a `<Canvas>` with an `<Image>` for drawing scrollbar marks. Otherwise, WinUI struggles with the up to ~9000 UI elements as they get dirtied every time the scrollbar moves. (FWIW 9000 is not a lot and it should not struggle with that.) The `<Image>` element has the benefit that we can get hold of a CPU-side bitmap which we can manually draw our marks into and then swap them into the UI tree. It draws the same 9000 elements, but now WinUI doesn't struggle anymore because only 1 element gets invalidated every time. Closes #15955 ## Validation Steps Performed * Fill the buffer with "e" * Searching for "e" fills the entire thumb range with white ✅ * ...doesn't lag when scrolling around ✅ * ...updates quickly when adding newlines at the end ✅ * Marks sort of align with their scroll position ✅
- Loading branch information
Showing
3 changed files
with
97 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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