[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Non-passable 1.0.1 conformance test: relying on canvas2D drawImage to not do colorspace conversion



Hi Benoit,

Thanks for finding this bug and for the fix. You're right, these two
tests were making incorrect assumptions.

The 1.0.1 conformance suite won't be considered "done" until we have
multiple browsers passing it on multiple platforms. For this reason
I've gone ahead and merged your bug fix back to the 1.0.1 snapshot.

-Ken


On Wed, Apr 18, 2012 at 2:20 PM, Benoit Jacob <bjacob@mozilla.com> wrote:
>
> Hi,
>
> I've just checked in a fix on the development branch (r17499):
>
> https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/textures/tex-image-and-sub-image-2d-with-image.html
>
> This test was non-passable (specifically, runTest2 and runTest3) because it was taking a color-managed PNG image, drew it onto a 2D canvas, obtained the data URL of this canvas, used it as the source for a WebGL texture, and was expecting exact pixel values from this texture. The problem was that even though
>
>    gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
>
> was used, it doesn't help with the fact that as soon as the image was drawn onto the 2D canvas, it was colorspace-transformed and the canvas doesn't contain the full information of the original image before colorspace transformation; so there is no hope that the original non-colorspace-transformed image could be obtained exactly from the 2D canvas.
>
> The question is what can we do about 1.0.1?
>  - I assume that we don't want any tweaks anymore in 1.0.1?
>  - could be make a 1.0.1.1? Or call that 1.0.2 and say that the development version is now heading towards 1.1?
>
> Notice that there is another way to fix this bug, without changing any JS code: we could use a non-color-managed version of red-green.png, as found here (courtesy of the libpng maintainer):
>
> http://people.mozilla.org/~bjacob/red-green-stripped.png
>
> This makes the test pass on colorspace-corrected systems without code changes.
>
> Cheers,
> Benoit
>
> -----------------------------------------------------------
> You are currently subscribed to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------