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

Issue 704155 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocked on:
issue 706850

Blocking:
issue 634542
issue 712377



Sign in to add a comment

Fix BaseRenderingContext2D create/put/get-ImageData() for color managed canvas

Project Member Reported by zakerinasab@chromium.org, Mar 22 2017

Issue description


* createImageData() and getImageData() must return an ImageData for which the color space and storage format matches those of canvas.
If canvas pixel format is "float16", the storage format of the returned ImageData must be "float32". Values must be properly converted from float16 to float32.

* putImageData must do the color conversion from the color space and storage format of given ImageData to the color space and matching pixel format of canvas prior to putting data into the canvas.

 
Summary: Fix BaseRenderingContext2D create/put/get-ImageData() for color managed canvas (was: Fix BaseRenderingContext2D.getImageData() to return color managed data correctly)
Description: Show this description
Labels: -Type-Bug Type-Feature
Blockedon: 706850
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 31 2017

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

commit 8befd9e691b73db52cc1d6edb6a99c1043a15b89
Author: zakerinasab <zakerinasab@chromium.org>
Date: Fri Mar 31 22:17:36 2017

Prepare ImageData for color managed BaseRenderingContext2D::create/put/get-ImageData

* createImageData() and getImageData() must return an ImageData for which the color space and storage format matches those of canvas.
If canvas pixel format is "float16", the storage format of the returned ImageData must be "float32". Values must be properly converted from float16 to float32.

* putImageData must do the color conversion from the color space and storage format of given ImageData to the color space and matching pixel format of canvas prior to putting data into the canvas.

This CL does half the job by adding required methods and the proper unit tests to ImageData.

BUG= 704155 , 706850 

Review-Url: https://codereview.chromium.org/2771813003
Cr-Commit-Position: refs/heads/master@{#461249}

[modify] https://crrev.com/8befd9e691b73db52cc1d6edb6a99c1043a15b89/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
[modify] https://crrev.com/8befd9e691b73db52cc1d6edb6a99c1043a15b89/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
[modify] https://crrev.com/8befd9e691b73db52cc1d6edb6a99c1043a15b89/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/8befd9e691b73db52cc1d6edb6a99c1043a15b89/third_party/WebKit/Source/core/html/ImageData.h
[modify] https://crrev.com/8befd9e691b73db52cc1d6edb6a99c1043a15b89/third_party/WebKit/Source/core/html/ImageDataTest.cpp

Project Member

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

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

commit 634dbb84b4876a928019a96d8cc80a011223f854
Author: timloh <timloh@chromium.org>
Date: Tue Apr 04 07:09:18 2017

Revert of Prepare ImageData for color managed BaseRenderingContext2D::create/put/get-ImageData (patchset #10 id:180001 of https://codereview.chromium.org/2771813003/ )

Reason for revert:
TestConvertPixelsFromCanvasPixelFormatToImageDataStorageFormat crashing

On WebKit Linux Trusty (dbg), has been flakily crashing (passing on retry) since it was added but now is crashing consistently.
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty%20%28dbg%29

Crashes more on the ClangToTLinuxASan/ClangToTMacASan fyi bots.
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_unit_tests&tests=TestConvertPixelsFromCanvasPixelFormatToImageDataStorageFormat

Original issue's description:
> Prepare ImageData for color managed BaseRenderingContext2D::create/put/get-ImageData
>
> * createImageData() and getImageData() must return an ImageData for which the color space and storage format matches those of canvas.
> If canvas pixel format is "float16", the storage format of the returned ImageData must be "float32". Values must be properly converted from float16 to float32.
>
> * putImageData must do the color conversion from the color space and storage format of given ImageData to the color space and matching pixel format of canvas prior to putting data into the canvas.
>
> This CL does half the job by adding required methods and the proper unit tests to ImageData.
>
> BUG= 704155 , 706850 
>
> Review-Url: https://codereview.chromium.org/2771813003
> Cr-Commit-Position: refs/heads/master@{#461249}
> Committed: https://chromium.googlesource.com/chromium/src/+/8befd9e691b73db52cc1d6edb6a99c1043a15b89

TBR=junov@chromium.org,zakerinasab@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 704155 , 706850 

Review-Url: https://codereview.chromium.org/2798523002
Cr-Commit-Position: refs/heads/master@{#461651}

[modify] https://crrev.com/634dbb84b4876a928019a96d8cc80a011223f854/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
[modify] https://crrev.com/634dbb84b4876a928019a96d8cc80a011223f854/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
[modify] https://crrev.com/634dbb84b4876a928019a96d8cc80a011223f854/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/634dbb84b4876a928019a96d8cc80a011223f854/third_party/WebKit/Source/core/html/ImageData.h
[modify] https://crrev.com/634dbb84b4876a928019a96d8cc80a011223f854/third_party/WebKit/Source/core/html/ImageDataTest.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 4 2017

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

commit c4df23d876fddc1f90b17aeaf4bad970239c6ecf
Author: zakerinasab <zakerinasab@chromium.org>
Date: Tue Apr 04 17:13:13 2017

Prepare ImageData for color managed BaseRenderingContext2D::create/put/get-ImageData

* createImageData() and getImageData() must return an ImageData for which the color space and storage format matches those of canvas.
If canvas pixel format is "float16", the storage format of the returned ImageData must be "float32". Values must be properly converted from float16 to float32.

* putImageData must do the color conversion from the color space and storage format of given ImageData to the color space and matching pixel format of canvas prior to putting data into the canvas.

This CL does half the job by adding required methods and the proper unit tests to ImageData.

BUG= 704155 , 706850 

Review-Url: https://codereview.chromium.org/2771813003
Cr-Original-Commit-Position: refs/heads/master@{#461249}
Committed: https://chromium.googlesource.com/chromium/src/+/8befd9e691b73db52cc1d6edb6a99c1043a15b89
Review-Url: https://codereview.chromium.org/2771813003
Cr-Commit-Position: refs/heads/master@{#461758}

[modify] https://crrev.com/c4df23d876fddc1f90b17aeaf4bad970239c6ecf/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
[modify] https://crrev.com/c4df23d876fddc1f90b17aeaf4bad970239c6ecf/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
[modify] https://crrev.com/c4df23d876fddc1f90b17aeaf4bad970239c6ecf/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/c4df23d876fddc1f90b17aeaf4bad970239c6ecf/third_party/WebKit/Source/core/html/ImageData.h
[modify] https://crrev.com/c4df23d876fddc1f90b17aeaf4bad970239c6ecf/third_party/WebKit/Source/core/html/ImageDataTest.cpp

Blocking: 712377
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 27 2017

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

commit 03d8a3084d1e21b685437607961f5ddccdf032b1
Author: zakerinasab <zakerinasab@chromium.org>
Date: Thu Apr 27 11:10:45 2017

Fix BaseRenderingContext2D create/put/get-ImageData() for color managed canvas

* createImageData() and getImageData() must return an ImageData for which the color space and storage format matches those of canvas.
If canvas pixel format is "float16", the storage format of the returned ImageData must be "float32". Values must be properly converted from float16 to float32.

* putImageData must do the color conversion from the color space and storage format of given ImageData to the color space and matching pixel format of canvas prior to putting data into the canvas.

BUG= 704155 , 709777 

Review-Url: https://codereview.chromium.org/2797213002
Cr-Commit-Position: refs/heads/master@{#467635}

[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/external/wpt/WebIDL/current-realm-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[add] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-createPutGetImageData-colorManaged.html
[rename] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/imageData-colorSpace.html
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/core/html/ImageData.h
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/core/html/ImageData.idl
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/platform/graphics/CanvasColorParams.cpp
[modify] https://crrev.com/03d8a3084d1e21b685437607961f5ddccdf032b1/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp

Status: Fixed (was: Assigned)
Blocking: 634542

Sign in to add a comment