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

fix: restore ability to disable color correct rendering (superseded) #15893

Closed
wants to merge 1 commit into from

Conversation

poiru
Copy link
Contributor

@poiru poiru commented Nov 29, 2018

In Electron 2.0, --disable-features=ColorCorrectRendering could be
used to make the app use the display color space (e.g. P3 on Macs)
instead of color correcting to sRGB. Because color correct rendering is
always enabled on Chromium 62 and later and because
--force-color-profile has no effect on macOS, apps that need e.g. P3
colors are currently stuck on Electron 2.0.

This restores the functionality removed in
https://chromium-review.googlesource.com/698347 in the form of the
--disable-color-correct-rendering switch.

This can be removed once web content (including WebGL) learn how
to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.

As an example of a widely used app using
--disable-features=ColorCorrectRendering, see VSCode:
https://github.com/Microsoft/vscode/blob/3f33ef2593d3efe6eca5230f3d34d3406fb73498/src/main.js#L138-L139

Notes: Add --disable-color-correct-rendering switch

@poiru poiru requested a review from a team November 29, 2018 20:39
@poiru poiru changed the title Add --disable-color-correct-rendering switch fix: restore ability to disable color correct rendering Nov 29, 2018
@poiru poiru force-pushed the disable-color-correct-rendering branch from b12f3f9 to 1198590 Compare November 29, 2018 20:40
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting a hold here to see if we can get this functionality via the experimental CanvasColorManagement blink feature in lieu of a patch

In Electron 2.0, `--disable-features=ColorCorrectRendering` could be
used to make the app use the display color space (e.g. P3 on Macs)
instead of color correcting to sRGB. Because color correct rendering is
always enabled on Chromium 62 and later and because
`--force-color-profile` has no effect on macOS, apps that need e.g. P3
colors are currently stuck on Electron 2.0.

This restores the functionality removed in
https://chromium-review.googlesource.com/698347 in the form of the
`--disable-color-correct-rendering` switch.

This can be removed once web content (including WebGL) learn how
to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.

As an example of a widely used app using
`--disable-features=ColorCorrectRendering`, see VSCode:
https://github.com/Microsoft/vscode/blob/3f33ef2593d3efe6eca5230f3d34d3406fb73498/src/main.js#L138-L139

Notes: Add `--disable-color-correct-rendering` switch
@poiru poiru force-pushed the disable-color-correct-rendering branch from 1198590 to 527aa2a Compare November 29, 2018 22:31
@poiru
Copy link
Contributor Author

poiru commented Nov 30, 2018

I was working with an older Electron checkout using Chromium 68 and didn't fully test this after rebasing on top of the latest Chromium 69 based master. Something in the 68 => 69 transition broke this patch for <canvas> although it continues to work for CSS and image colors. I'll investigate and open a new PR after I figure it out.

@poiru poiru closed this Nov 30, 2018
@poiru poiru deleted the disable-color-correct-rendering branch November 30, 2018 12:06
@poiru
Copy link
Contributor Author

poiru commented Nov 30, 2018

Here's the new PR: #15898

@poiru poiru changed the title fix: restore ability to disable color correct rendering fix: restore ability to disable color correct rendering (superseded) Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants