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

Issue 668547 link

Starred by 2 users

Issue metadata

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

Blocked on:
issue 840372

Blocking:
issue 634542



Sign in to add a comment

Testing createImageBitmap color space conversion in a layout test

Project Member Reported by zakerinasab@chromium.org, Nov 24 2016

Issue description

Currently we cannot test the color space conversion attribute passed to the createImageBitmap in a layout test. 
This affects the layout tests that were created without passing this parameter, for which now "default"
color space conversion is assumed. Examples can be seen in  codereview.chromium.org/2522693002 -> 
tex-image-and-sub-image-image-bitmap-utils.js -> runTestOnBindingTarget(). 

If we decide that there is no way
to test this in a layout test, these tests must be removed from this script and all the layout tests in 
fast/canvas/webgl/texImage-imageBitmap-*.html.


 
Blocking: 665919
By putting the new behavior of "default" color space conversion mode behind a flag in codereview.chromium.org/2522693002 the previous layout tests do not fail anymore. However this bug is still open as the requirement for layout tests for createImageBitmap is still valid.
Labels: -Type-Bug Type-Feature
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 6 2017

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

commit af0188902ff0dada4e69be68c4c057717c36a2b1
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Wed Sep 06 16:19:30 2017

Add layout tests for color managed createImageBitmap

Along with some corrections in the color management code path,
this change adds three layout tests to test createImageBitmap in
linear-rgb, p3 and rec2020 color spaces from different sources in
different color spaces. The test coverage is not complete as some
sources (image, video, svg) are not decodable in non-srgb color spaces
for now. Furthermore, color correcting OffscreenCanvas works fine in
software code path, but fails in accelerated code path ( crbug.com/761424 ).

Bug:  668547 , 754713 
Change-Id: I5bbc23e00d8886c1c34e171101036195dd4a4e5c
Reviewed-on: https://chromium-review.googlesource.com/646508
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499983}
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-createImageBitmap-linear-rgb.html
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-createImageBitmap-p3.html
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-createImageBitmap-rec2020.html
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-srgb-fullcolor.ogv
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-srgb-transparent.png
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-srgb.png
[add] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/resources/pattern-srgb.svg
[modify] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.cpp
[modify] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/Source/core/imagebitmap/ImageBitmapTest.cpp
[modify] https://crrev.com/af0188902ff0dada4e69be68c4c057717c36a2b1/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp

Blockedon: 663569
Update: after the above CL, we have test coverage for createImageBitmap from these wide color gamut sources:
HTMLCanvasElement, ImageData, ImageBitmap, OffscreenCanvas (unaccelerated path)

For these sources, we still miss the test coverage for createImageBitmap from WCG sources:
HTMLImageElement, HTMLVideoElement, Blob
Labels: -Pri-3 Pri-2
Blocking: 634542

Comment 8 Deleted

Blockedon: 663569
Cc: -xidac...@chromium.org fs...@chromium.org
Not sure what we should do for the video, probably will ask hubbe@. Blob and HTMLImageElement should be doable now.
Blockedon: 840372
Ah, toBlob() is now converting to sRGB. After we landed convertToBlob() ( crbug.com/840372 ), we can fix this.
Blockedon: -663569
Cc: -junov@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment