New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 713867 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 839034
issue 848252

Blocking:
issue 634542



Sign in to add a comment

Draw high bit depth images on wide gamut canvas without color precision loss

Project Member Reported by zakerinasab@chromium.org, Apr 20 2017

Issue description

When crbug.com/663569 and  crbug.com/713862  are fixed, write some layout tests to examine correct image encode / decode for color managed canvases.


 
Blocking: 634542
Summary: Write image encode/decode layout tests for color managed canvas (was: Write image encode/decode layout tests)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4fbe07145581f334d87439590df5ad322896b0e

commit f4fbe07145581f334d87439590df5ad322896b0e
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue Sep 05 20:08:00 2017

Add drawImage layout tests for color managed canvas

This CL adds three layout tests that draw a SRGB image on a color managed
canvas and check the pixels to be in the canvas color space. For now,
we cannot load wide gamut images in HTMLImageElement as the migration
to Skia image decoders is not finished yet (crbug.com/663569).

Bug:  713867 
Change-Id: I4c6044d791f0d60917053e26ad860693937d3682
Reviewed-on: https://chromium-review.googlesource.com/638438
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499725}
[add] https://crrev.com/f4fbe07145581f334d87439590df5ad322896b0e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-drawImage-linear-rgb.html
[add] https://crrev.com/f4fbe07145581f334d87439590df5ad322896b0e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-drawImage-p3.html
[add] https://crrev.com/f4fbe07145581f334d87439590df5ad322896b0e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-drawImage-rec2020.html
[add] https://crrev.com/f4fbe07145581f334d87439590df5ad322896b0e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-semitransparent-p3d65.png
[add] https://crrev.com/f4fbe07145581f334d87439590df5ad322896b0e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-semitransparent-rec2020.png
[add] https://crrev.com/f4fbe07145581f334d87439590df5ad322896b0e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-semitransparent-srgb.png

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.
Labels: -Pri-3 Pri-2
Blockedon: -663569 skia:7588
Blockedon: -skia:7588
Blockedon: skia:7588
Blockedon: -skia:7588
Cc: fs...@chromium.org
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.
Blockedon: 663569
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.
Cc: -junov@chromium.org
Blockedon: -713862 -663569 839034 848252
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.
Project Member

Comment 15 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29

commit 81b08fd531af5e9ab4ca317067cceaeb4a0ddd29
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue Oct 09 20:05:05 2018

Draw high bit depth images on wide gamut canvas without color precision loss

After having high bit depth support in PNGImageDecoder and ImageDecodeCache,
this CL finally makes it possible to draw high bit depth images on wide
gamut canvases without losing any color precision.

Bug:  713867 ,  890342 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I5d7a11fe2d0ff6c96999af879f142e512fa11f2a
Reviewed-on: https://chromium-review.googlesource.com/c/1246785
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598055}
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/cc/paint/paint_image.cc
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/cc/paint/paint_image.h
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/cc/paint/paint_image_builder.h
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/WebKit/LayoutTests/fast/canvas/color-space/high-bit-depth-images.html
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/WebKit/LayoutTests/images/resources/png-16bit/2x2_16bit_interlaced_e-sRGB_opaque.png
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/WebKit/LayoutTests/images/resources/png-16bit/2x2_16bit_interlaced_e-sRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/WebKit/LayoutTests/platform/linux/css3/masking/mask-repeat-space-padding-expected.png
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/WebKit/LayoutTests/platform/mac/css3/masking/mask-repeat-space-padding-expected.png
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/WebKit/LayoutTests/platform/win/css3/masking/mask-repeat-space-padding-expected.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_AdobeRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_AdobeRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_DisplayP3_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_DisplayP3_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_ProPhoto_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_ProPhoto_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_Rec2020_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_Rec2020_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_e-sRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_e-sRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_e-sRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_e-sRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_sRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_16bit_sRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_AdobeRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_AdobeRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_DisplayP3_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_DisplayP3_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_ProPhoto_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_ProPhoto_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_Rec2020_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_Rec2020_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_e-sRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_e-sRGB_transparent.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_sRGB_opaque.png
[add] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/core/testing/data/png-16bit/2x2_8bit_sRGB_transparent.png
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/bitmap_image.cc
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/color_correction_test_utils.h
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/decoding_image_generator.cc
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/deferred_image_decoder.cc
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/graphics/deferred_image_decoder.h
[modify] https://crrev.com/81b08fd531af5e9ab4ca317067cceaeb4a0ddd29/third_party/blink/renderer/platform/image-decoders/png/png_image_decoder.cc

Status: Fixed (was: Assigned)
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c1bcc2b262ea9d136c4050b06bf1009e7e20fedc

commit c1bcc2b262ea9d136c4050b06bf1009e7e20fedc
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Thu Oct 11 18:40:05 2018

Clean up high bit depth drawing layout tests

Now we have an extensive set of tests in draw-high-bit-depth-images.html, we don't need
to extend these tests any more.

NOTRY=true
TBR=fserb@chromium.org

Bug:  713867 
Change-Id: I7390b9fe420f35ada44c2e89b7ebdce29952ff4d
Reviewed-on: https://chromium-review.googlesource.com/c/1276891
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598866}
[modify] https://crrev.com/c1bcc2b262ea9d136c4050b06bf1009e7e20fedc/third_party/WebKit/LayoutTests/fast/canvas/color-space/canvas-drawImage-linear-rgb.html
[modify] https://crrev.com/c1bcc2b262ea9d136c4050b06bf1009e7e20fedc/third_party/WebKit/LayoutTests/fast/canvas/color-space/canvas-drawImage-p3.html
[modify] https://crrev.com/c1bcc2b262ea9d136c4050b06bf1009e7e20fedc/third_party/WebKit/LayoutTests/fast/canvas/color-space/canvas-drawImage-rec2020.html

Sign in to add a comment