-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor GPU: Support inline decorations that change only text color (eg. bracket pair colorization) #234127
Merged
+946
−90
Conversation
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
Part of #227095
This was causing mouse event request paths to get messed up
Tyriar
force-pushed
the
tyriar/gpu_decorations_wip
branch
from
November 22, 2024 15:35
79fa578
to
27687b2
Compare
Since this now depends on the DOM, it's too difficult and inconsistent to pass in a DOM node to do the inline decoration test on. It's simplest to pass it in to whatever view parts need it.
Tyriar
changed the title
Decorations wip
Editor GPU: Support inline decorations that change only text color (eg. bracket pair colorization)
Nov 22, 2024
lszomoru
approved these changes
Nov 22, 2024
This comment was marked as spam.
This comment was marked as spam.
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.
This change adds support for rendering some inline decorations on the GPU, specifically those that only change the
color
style. This is done for each inline decoration by walking the stylesheet tree to find relevant styles, parsing them and applying the result to the glyph metadata.See no yellow bar on the left, meaning they're all GPU lines:
Supporting all of CSS is obviously out of scope, but I think we could support the vast majority of decorations by supporting a small selection of styles like
color
,background-color
,background
,font-style
,text-decoration-*
, etc. most of which are easy to actually render once we get the data to the rasterizer.Part of #227095
Fixes #233989
TODO follow ups deferred: