Transferring wide color gamut encoded images in a mailbox |
||||
Issue descriptionTransferableResource has a gfx::ColorSpace member that allows to specify the color space of the pixels stored in viz::SharedBitmap. This can be used to transfer the wcg pixels when the gamut is well defined (sRGB, p3, etc.). Skia ICC math does not perfectly round-trip. This means that when a wide color gamut image is encoded using Skia encoders in Blink, for example by calling toBlob on a P3 canvas, the ICC profile that defines the gamut of the encoded image will be close to P3, but it will not be P3. Consequently, we cannot properly create a gfx::ColorSpace param, and fail to properly propagate color space information. The only solution that comes to my mind is to replace/augment gfx::ColorSpace param with a gfx::ICCProfile param in TransferableResource, assuming that there is a way to convert arbitrary Skia color spaces to a gfx::ICCProfile. Adding ccameron@ and brianosman@ to help in this discussion.
,
Dec 19 2017
What if instead of fixing the round-trip, Skia provides a color space comparison method that "considers" the errors that might get introduced during a round-trip?
,
Dec 19 2017
> The only solution that comes to my mind is to replace/augment > gfx::ColorSpace param with a gfx::ICCProfile This has some security issues, since the ICCProfile blob will be then parsed in a different location. I'm in favor of #1 and also beefing up the gfx::ColorSpace support of ICCProfiles to check for things that are "close enough" as well.
,
Feb 16 2018
,
May 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3de68da5fcc2b3594795b6afb7699a42e931999e commit 3de68da5fcc2b3594795b6afb7699a42e931999e Author: Reza.Zakerinasab <zakerinasab@chromium.org> Date: Thu May 10 19:19:12 2018 Add color management to ImageBitmapRenderingContext This change adds color management to ImageBitmapRenderingContext. Bug: 782383 , 785389 , 796226 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I653bc2e5d3a32f5211bd09c80ee35b6f4df6ad92 Reviewed-on: https://chromium-review.googlesource.com/973801 Reviewed-by: Justin Novosad <junov@chromium.org> Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Cr-Commit-Position: refs/heads/master@{#557619} [add] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/transferFromImageBitmap.html [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/BUILD.gn [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.h [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/offscreen_canvas_resource_provider.cc [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/skia/skia_utils.cc [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/skia/skia_utils.h [add] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/skia/skia_utils_test.cc [modify] https://crrev.com/3de68da5fcc2b3594795b6afb7699a42e931999e/third_party/blink/renderer/platform/graphics/unaccelerated_static_bitmap_image.cc
,
May 17 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by brianosman@chromium.org
, Dec 19 2017