Skip to content
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

Account for sRGB #13378

Open
retep998 opened this issue Sep 22, 2016 · 3 comments
Open

Account for sRGB #13378

retep998 opened this issue Sep 22, 2016 · 3 comments

Comments

@retep998
Copy link

@retep998 retep998 commented Sep 22, 2016

Currently Servo, like all other major browsers, does not account for the non-linear nature of sRGB. This means that any sort of blending or resizing operation is inherently flawed and incorrect.

The solution to this will likely involve webrender, making sure images are loaded as srgb textures so the GPU will convert to linear when sampling from them, and setting the output framebuffer to be srgb enabled, so the GPU converts back to srgb before displaying the result. Also any color constants will have to be converted from srgb to linear.

Servo has an opportunity to differentiate itself from other browsers here by actually being good at something. Don't let it go to waste.

@glennw
Copy link
Member

@glennw glennw commented Sep 22, 2016

Agreed, we should do this! It's not a huge amount of work (basically the steps outlined above), but it's quite fiddly to get the entire pipeline correct and ensure everything is in the correct space at the right time.

@notriddle
Copy link
Contributor

@notriddle notriddle commented Sep 23, 2016

Am I the only one who's worried about making some webpages look crappy because the authors already tried to compensate and we end up compensating a second time?

@retep998
Copy link
Author

@retep998 retep998 commented Sep 23, 2016

@notriddle Until someone can find an example of an actual website in the wild that compensates for the lack of sRGB compliance in modern browsers, I wouldn't be too worried about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.