Open Bug 1473888 Opened 7 years ago Updated 3 years ago

Invalid alpha channel when drawing WebGL canvas to 2D canvas

Categories

(Core :: Graphics: Canvas2D, defect, P3)

63 Branch
defect

Tracking

()

People

(Reporter: bartosz.zielinski, Unassigned)

References

()

Details

(Keywords: parity-chrome, regression, testcase, Whiteboard: [gfx-noted])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 Steps to reproduce: Drawing transparent WebGL canvas to 2D canvas (without premultiplied alpha and with alpha channel enabled) ignores WebGL canvas alpha channel. Actual results: Check out following example: http://jsfiddle.net/qj4xc7f5/16/ And compare with Chrome. What is strange, on OSX second example work, because 2D canvas size is smaller than 128x128 pixels. First two examples work in Nightly, but third one doesn't. Expected results: First two black rectangles from jsfiddle should be completely black, third rectangle with very faint red tint.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0 20180706100210 (In reply to Bartosz from comment #0) > First two examples work in Nightly, but third one doesn't. I see 3 black rectangles containing 3 smaller red rectangles, which doesn't match your expected results.
Has STR: --- → yes
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
(In reply to Gingerbread Man from comment #1) > Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 > Firefox/63.0 > 20180706100210 > > (In reply to Bartosz from comment #0) > > First two examples work in Nightly, but third one doesn't. > > I see 3 black rectangles containing 3 smaller red rectangles, which doesn't > match your expected results. The results may vary from system to system and may depend on GPU. Any visible completely red rectangle (#FF0000) is an effect of the bug. Compare the "Expected results" from this bug and also compare with Chrome. The result on Windows in Nightly 63.0a1 with GTX 1070 is only 1 black rectangle with small red.
Attached image Expected result
Expected result
Attachment #8990335 - Attachment description: firebug.png → Expected result
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jgilbert)
Keywords: regression
Priority: -- → P3
Whiteboard: [gfx-noted]

Ah, yeah, looks like it's not being premultiplied in c2d.drawImage.

Flags: needinfo?(jgilbert)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: