You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've found an issue with one of the tests. The WhatWG specification on the canvas element says the following:
Due to the lossy nature of converting to and from premultiplied alpha color values, pixels that have just been set using putImageData() might be returned to an equivalent getImageData() as different values.
To my understanding, the test 2d.imageData.put.unchanged, line 38, does not seem to allow for this wiggle room since it uses _assertSame to compare pixels that just have been set using putImageData and then retrieved using getImageData.
The text was updated successfully, but these errors were encountered:
hansfilipelo
changed the title
2d.imageData.put.unchanged: Allow for browser optimization
2d.imageData.put.unchanged: Allow for pixel data to change with put/get
Feb 3, 2020
It was found that this commit in Chromium, included in Chromium 79 and above, caused the test to fail on many hardware platforms.
The commit adds an optimization which switches the canvas to software rendering if more than one call to getImageData is made. This is done since transferring data from a GPU into RAM can be slow. The switch from a hardware to software backed canvas makes the interpolation return slightly differently values on most platforms - causing the test to fail.
I went digging into the issue thinking it was a Chromium bug. Reading the spec made me reconsider and instead think it is an error with the test. If it is not, I'm happy to be pointed in the right direction.
Hi.
I think I've found an issue with one of the tests. The WhatWG specification on the canvas element says the following:
Due to the lossy nature of converting to and from premultiplied alpha color values, pixels that have just been set using putImageData() might be returned to an equivalent getImageData() as different values.
To my understanding, the test 2d.imageData.put.unchanged, line 38, does not seem to allow for this wiggle room since it uses
_assertSame
to compare pixels that just have been set usingputImageData
and then retrieved usinggetImageData
.The text was updated successfully, but these errors were encountered: