from olegmax@yandex-team.ru: Regarding https://chromium-review.googlesource.com/c/chromium/src/+/1148787 You've doubled interlace buffer size for 16bit here https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/image-decoders/png/png_image_decoder.cc?l=533, but kept addressing into the buffer https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/image-decoders/png/png_image_decoder.cc?l=600 Looks like address should also be *2 for 16bit PNG. Investigate and fix if necessary.
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
Comment 1 by zakerinasab@chromium.org
, Oct 1