Repository navigation
fix: restore ability to disable color correct rendering - #15898
Conversation
7c77850 to
8a88557
Compare
|
I confirmed that #FF0000 with main.js: test.html: |
8a88557 to
fd56b87
Compare
nornagon
left a comment
There was a problem hiding this comment.
It is far from clear to me that this patches all the necessary places, and I'm concerned about continuing support for this flag in the face of future upstream refactors in Chrome's rendering code, but I'm satisfied that at least for this particular version of Chrome that this patch does not change behaviour unless you pass the flag, so I'm approving anyway.
Please be prepared for this flag to get disabled in a future chrome upgrade if you're not around to help port it :)
| RendererSettings renderer_settings; | ||
| base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | ||
| + renderer_settings.enable_color_correct_rendering = | ||
| + !command_line->HasSwitch("disable-color-correct-rendering"); |
There was a problem hiding this comment.
please add a string constant kDisableColorCorrectRendering so that typos will be a compile error :)
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
fd56b87 to
3af9274
Compare
|
Release Notes Persisted
|
|
I was unable to backport this PR to "3-1-x" cleanly; |
|
I was unable to backport this PR to "4-0-x" cleanly; |
…0-x) Backport of #15898 See that PR for details. Notes: Add `--disable-color-correct-rendering` switch
|
@poiru did this ever land on 3-0-x? |
This broke in Electron 6 due to some Chromium changes. Test Plan: - Confirm that test case from electron#15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering`
…20356) This broke in Electron 6 due to some Chromium changes. Test Plan: - Confirm that test case from #15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering`
This regressed once again in Electron 8 due to Chromium changes. Test Plan: - Confirm that test case from electron#15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering`
…23787) This regressed once again in Electron 8 due to Chromium changes. Test Plan: - Confirm that test case from #15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering`
This regressed once again in Electron 8 due to Chromium changes. Test Plan: - Confirm that test case from #15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering`
This regressed once again in Electron 8 due to Chromium changes. Test Plan: - Confirm that test case from #15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering`
…23899) This regressed once again in Electron 8 due to Chromium changes. Test Plan: - Confirm that test case from #15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering` Co-authored-by: Biru Mohanathas <[email protected]>
…23900) * fix: Make the `--disable-color-correct-rendering` switch work again This regressed once again in Electron 8 due to Chromium changes. Test Plan: - Confirm that test case from #15898 (comment) now works Notes: Fix disabling color correct rendering with `--disable-color-correct-rendering` * update patches Co-authored-by: Biru Mohanathas <[email protected]> Co-authored-by: Electron Bot <[email protected]>
In Electron 2.0,
--disable-features=ColorCorrectRenderingcould beused 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-profilehas no effect on macOS, apps that need e.g. P3colors 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-renderingswitch.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-renderingswitch