Closed
Bug 1093037
Opened 10 years ago
Closed 9 years ago
WebGL canvas.toDataURL() fails on Firefox 33.
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jujjyl, Unassigned)
References
Details
STR:
1. Visit https://dl.dropboxusercontent.com/u/40949268/Bugs/ff33_canvas_toDataURL_fail/test.html
Observed: The text box prints multiple lines
"ERROR: Pixel at 90x177 differs from reference: Expected: 255, got: 0"
"9680 pixels failed the reftest."
and the displayed image "actual" at the bottom of the page is empty.
Expected: The text box should print
"0 pixels failed the reftest."
and the displayed image "actual" at the bottom of the page should display a red triangle.
This bug appeared with Firefox 33, FF 32 did not have the issue. Also, current FF Beta no longer has the issue.
Reporter | ||
Comment 1•10 years ago
|
||
Debugging the issue, it looks like in Firefox, getImageData() returns data in alpha-premultiplied form (this is a hunch), and in the tests, the data has alpha channel=0 for all pixels, and each test ends up comparing a black image to the reference image. Bisecting through mozilla-central, the regression was introduced here:
Last good revision: f78e532e8a10 (2014-06-19)
First bad revision: bdac18bd6c74 (2014-06-20)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f78e532e8a10&tochange=bdac18bd6c74
where I can see these commits that are related
8c6e3225774d Jeff Gilbert — Bug 1000640 - Mark C/A 1.0/0.5 non-premult test as random, since it passes on Win7 Ru. - r=mattwoodrow
9f1de5457faa Jeff Gilbert — Bug 1000640 - Mark WinXP as failing color-alpha-test unpremultiplied reftests. - r=mattwoodrow
058e30492755 Jeff Gilbert — Bug 1000640 - Crash if we try to use the Gralloc path in TextureHost. - r=mattwoodrow
68dfeae0d1be Jeff Gilbert — Bug 1000640 - Use new StreamTextureClient/Host with OMTC. - r=mattwoodrow
8c58bf5d1779 Jeff Gilbert — Bug 1000640 - Update Gralloc and ANGLE ShSurf backends. - r=mattwoodrow
26d7072ac870 Jeff Gilbert — Bug 1000640 - Death to whitespace. - r=mattwoodrow
1b61cfccf828 Jeff Gilbert — Bug 1000640 - Handle non-premult alpha in Layers. - r=mattwoodrow
Seems that some change made Jeff disable similar sounding tests in Firefox. Bisecting further, this bug was later fixed in
Last bad revision: 18f408a5984e (2014-08-08)
First fixed revision: 83f519eb1a3a (2014-08-09)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=18f408a5984e&tochange=83f519eb1a3a
where I see these commits
b065f0ebf575 Jeff Gilbert — Bug 1045955 - Style fix. - r=kamidphish
ea7593d2b0bd Jeff Gilbert — Bug 1045955 - Tighten requirements for framebuffer_blit, and use GL_FRAMEBUFFER when unavailable. - r=kamidphish
27af4489326f Jeff Gilbert — Bug 1045955 - Allow blitting 'internal' fb0. - r=kamidphish
2260b0f9e424 Jeff Gilbert — Bug 1045955 - Make snapshots pick RGBA or RGBX. - r=kamidphish
that look like fixing the issue.
Updated•10 years ago
|
Flags: needinfo?(jgilbert)
On Win 7 with ATI X1300
Firefox 38.0a1 (2015-01-15) : FAIL (80 pixels failed the reftest.)
Chrome Version 42.0.2277 : PASS
https://dl.dropboxusercontent.com/u/40949268/Bugs/ff33_canvas_toDataURL_fail/test.html
Is only broken with the D3D11 ANGLE back-ends in Firefox, but work sometimes works with Firefox's D3D9 and always with OpenGL back-end. It also always works fine with Chrome's D3D11 ANGLE back-end. Strangely, it also fails the first attempt with FF D3D9, but passes the 2nd. Refreshing the D3D11 back-end does not help.
@Jukka Jylänki
Why does the test pass when the expected/top image has a white background, while the actual/bottom result has a black background? Or am I interpreting your test incorrectly?
Reporter | ||
Comment 4•10 years ago
|
||
That is ok and expected, because the test only checks (R,G,B) channels for correctness, and ignores rendered alpha. The PNG reference image has (0,0,0,0) pixels in the background (fully transparent black, which causes the page background to shine through), whereas the rendered image has (0,0,0,255) pixels in the background (fully opaque black). For the purposes of that test, differences in alpha are ignored.
Reporter | ||
Comment 5•10 years ago
|
||
Testing today on Windows 8.1 and a MSI GeForce 980 GTX,
Firefox 36 stable channel fails the test,
Firefox 37 beta channel fails the test,
Firefox 38.0a2 (2015-03-20) dev channel fails the test,
Firefox 39.0a1 (2015-03-20) passes the test.
Comment 6•10 years ago
|
||
Jukka, could you check if this was fixed by bug 1146034? We're trying to uplift that fix to 38, and if it fixes this problem, it increases the chances of that getting done.
Comment 7•10 years ago
|
||
Although, bug 1146034 only got fixed after you tested the problem and had it show up as fixed, so probably not that...
Comment 8•9 years ago
|
||
So I see the triangle in both, but one has a black background and the other with a white background.
Let's close this if that's sufficient.
Flags: needinfo?(jgilbert) → needinfo?(jujjyl)
Reporter | ||
Comment 9•9 years ago
|
||
Comment 5 says it was fixed between 38 and 39, and at the time this was a question about uplifting fixes, but no longer relevant.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jujjyl)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•