Update: after the above CL, we have test coverage for drawing SRGB image into wide color gamut canvas, but we still miss the coverage for drawing wide gamut images on the canvas.
The progress on this bug is not blocked by the gamma encoding issue in Skia. Something else is wrong here which prevents the wide gamut source image from correctly being drawn on the wide gamut canvas. FWIW, the tests also fail when drawing a P3 image with linear embedded gamma. Therefore, we either have a decoding issue or a canvas drawing issue in Blink (or both). This requires more investigation.
I suggest to extend this test to draw {sRGB, linear RGB, display P3, linear P3, rec2020, linear rec2020, Adobe RGB} images on {sRGB, linear RGB, linear P3, linear Rec2020} canvases. The idea is that we need to make sure as long as we have the color profile embedded in the image, and it can be read by Skia, we should have the same result after drawing the source image on a wide gamut canvas.
Apparently Blink image decoders fail to correctly decode images with embedded wide gamut ICC profile (for example, linear P3 and Display P3). SkCodec works fine as far as I have tested, therefore, blocking on crbug.com/663569.
Summary: Draw high bit depth images on wide gamut canvas without color precision loss (was: Write image encode/decode layout tests for color managed canvas)
Now that PNGImageDecoder correctly decodes 16 bit PNGs and ImageDecodeCache correctly caches half float backed images, we're ready to complete the pipeline and draw high bit depth images on half float backed images without any color precision loss.
Comment 1 by zakerinasab@chromium.org
, Apr 20 2017