Drawing an sRGB image into a DisplayP3 canvas and then into sRGB canvas yields different results than if you only draw it into the sRGB canvas.
Created attachment 428832 [details] Test case where both are drawn and tested
Created attachment 428833 [details] Test case where only the sRGB canvas is drawn into
NOTE: This requires ToT WebKit with the CanvasColorSpacesEnabled feature enabled.
This seems to be related to some cache, as to see the results, you must open a new window for each test case, otherwise, the tests will taint each other.
It also seems to have to do with canvas accelerated graphics as disabling that (via the Debug -> Drawing and Compositing Flags, etc.) causes the issue to go away.
Created attachment 428834 [details] Visual Test (all three squares should be the same color)
Created attachment 428866 [details] Visual Test (all three squares should be the same color)
Updated the visual test case, the getImageData() was not necessary. Now to uncover all the different image caches in WebKit to see which one is acting up.
<rdar://problem/78402035>
Created attachment 433411 [details] Visual Test (only the sRGB ones)
This is being tracked internally.
👍