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

Issue 806994 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Don't use hard coded reference pixels for ImageBitmap resize layout tests

Project Member Reported by zakerinasab@chromium.org, Jan 29 2018

Issue description

Several imagebitmap resize tests are failing as Skia team is trying to fix some small color error in unpremul scale code:

https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/22726/layout-test-results/results.html
https://skia-review.googlesource.com/c/skia/+/90480

The source of the problem is the hard coded expected pixels in the helper js file:

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/webgl/resources/tex-image-and-sub-image-image-bitmap-utils-resize.js

We should avoid these hard coded reference pixels by, for example, drawing a source image to a canvas and reading back the resized pixels.
- We can use context.scale to flipY.
- We have to manually multiply alpha to the read pixels to get premul.



 
Since createImageBitmap is the only API that exposes different Skia filter qualities, it is not possible to generate the target data using another API. For now, we suppress these tests so Skia can proceed with changing the scaling algorithm until we find a better solution for this.
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 1 2018

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

commit 94f7e5c05d04d59ed8dbcc34fc789391502b99d9
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Thu Feb 01 00:39:38 2018

Don't use hard coded reference pixels for ImageBitmap resize layout tests

Bug:  806994 
Change-Id: Ic1fd685f49a284f220ba39facfd6f8ac6710806b
Reviewed-on: https://chromium-review.googlesource.com/895056
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533492}
[modify] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/resources/tex-image-and-sub-image-image-bitmap-utils-resize.js
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.png
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.txt
[modify] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-blob-resize.html
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.png
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.txt
[modify] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-canvas-resize.html
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.png
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.txt
[modify] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-image-resize.html
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-imageData-resize-expected.png
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-imageData-resize-expected.txt
[modify] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-imageData-resize.html
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.png
[add] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.txt
[modify] https://crrev.com/94f7e5c05d04d59ed8dbcc34fc789391502b99d9/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize.html

Thank you!
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 2 2018

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

commit 572b06f71ba0e7db3f133a350a73d8e9049e6597
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Fri Feb 02 18:05:53 2018

Don't use hard coded reference pixels for ImageBitmap resize layout tests

This is a follow up CL for chromium-review.googlesource.com/c/chromium/src/+/895056.
This change:
 - removes hard coded reference pixels from video source layout test.
 - adds debug info for each tile to the console output.

Bug:  806994 
Change-Id: I85d17fe1eb329282231b7843fbff94d31372cfb6
TBR: junov@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/899662
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534094}
[delete] https://crrev.com/938b14259b4b637309faff2ebfd88a9084644469/third_party/WebKit/LayoutTests/fast/webgl/resources/tex-image-and-sub-image-image-bitmap-utils-resize-video.js
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/resources/tex-image-and-sub-image-image-bitmap-utils-resize.js
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.png
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.txt
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.png
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.txt
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.png
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.txt
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-imageData-resize-expected.png
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-imageData-resize-expected.txt
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.png
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.txt
[add] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-video-resize-expected.png
[add] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-video-resize-expected.txt
[modify] https://crrev.com/572b06f71ba0e7db3f133a350a73d8e9049e6597/third_party/WebKit/LayoutTests/fast/webgl/texImage-imageBitmap-from-video-resize.html

Status: Fixed (was: Assigned)

Sign in to add a comment