[Skia] Text rendered as much less heavy compared to other browsers#59880
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Mar 5, 2026
Merged
[Skia] Text rendered as much less heavy compared to other browsers#59880webkit-commit-queue merged 1 commit intoWebKit:mainfrom
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 7806518) Details |
7806518 to
9f3ddf9
Compare
Collaborator
|
EWS run on previous version of this PR (hash 9f3ddf9) Details |
9f3ddf9 to
e477d92
Compare
Collaborator
|
EWS run on previous version of this PR (hash e477d92) Details |
e477d92 to
cad04eb
Compare
Collaborator
|
EWS run on previous version of this PR (hash cad04eb) Details |
cad04eb to
4ec95a3
Compare
Collaborator
|
EWS run on previous version of this PR (hash 4ec95a3) Details |
4ec95a3 to
86acd4d
Compare
Collaborator
|
EWS run on current version of this PR (hash 86acd4d) Details |
carlosgcampos
approved these changes
Mar 5, 2026
https://bugs.webkit.org/show_bug.cgi?id=309152 Reviewed by Carlos Garcia Campos. This change makes all the text rendered by skia look right - i.e. just like in other browsers - by incorrectly blending in linear color space despite target being in non-linear color space. Until this patch, the rendering was done mathematically correct i.e. the blending was done with respect to target's color space. However, historically, many fonts were designed for incorrect blending and hence they look the most "correct" in such a circumstances. As skia internally implements so called "gamma hack", this change tweaks SkSurfaceProps to properly tune it so that text looks correct. Despite chromium uses 0.2 for contrast and 1.2 for gamma, this change chooses 0 for contrast and 1 for gamma, as the results are visually indistinguishable and yet in some reftests, the differences between anti-aliased pixels are smaller. So in other words, this change makes text anti-aliasing more stable (uniform) when it comes to very small, sub-pixel positioning differences. No new tests. Canonical link: https://commits.webkit.org/308692@main
86acd4d to
4613261
Compare
Collaborator
|
Committed 308692@main (4613261): https://commits.webkit.org/308692@main Reviewed commits have been landed. Closing PR #59880 and removing active labels. |
Contributor
|
Backported to 2.52 branch |
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.
4613261
86acd4d
🛠 win🧪 win-tests🧪 api-wpe🧪 ios-wk2-wpt🧪 api-mac-debug🧪 api-ios🧪 vision-wk2🛠 mac-safer-cpp🛠 watch-sim