Address test_drawWindow_widget_layers.html failure with WebRender
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(3 files, 1 obsolete file)
test_drawWindow_widget_layers.html test failed with WebRender.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
When I run the test locally with the following command, it always succeeded. But it failed on try tests.
MOZ_ACCELERATED=1 MOZ_WEBRENDER=1 ./mach test dom/canvas/test/chrome/test_drawWindow_widget_layers.html
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
•
|
||
From attachment 9040327 [details], it seems that the readback image lost transparency.
The image was readback via CanvasRenderingContext2D::DrawWindow()
https://searchfox.org/mozilla-central/rev/b6f330e5234582eb921559dbfc852d263e14d93b/content/canvas/src/CanvasRenderingContext2D.cpp#3170
The DrawWindow() was called from
https://searchfox.org/mozilla-central/source/dom/canvas/test/file_drawWindow_common.js
Assignee | ||
Comment 5•6 years ago
|
||
When I locally tested, GLContextGLX::FindVisual() was called with requesting alpha in nsWindow::Create().
https://searchfox.org/mozilla-central/rev/956e93c403573cead1717b774e924cfee561efa9/widget/gtk/nsWindow.cpp#3256
But on try test needsAlphaVisual was false. When it was false, GLContextGLX::FindVisual() chooses RGB(24bit) visual.
https://searchfox.org/mozilla-central/rev/187dfafc29f4cc692b724b544def376c4de761fd/gfx/gl/GLContextProviderGLX.cpp#1172
Assignee | ||
Comment 6•6 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #5)
But on try test needsAlphaVisual was false. When it was false, GLContextGLX::FindVisual() chooses RGB(24bit) visual.
https://searchfox.org/mozilla-central/rev/187dfafc29f4cc692b724b544def376c4de761fd/gfx/gl/GLContextProviderGLX.cpp#1172
When I set needsAlphaVisual = false, the test failed locally and captured image was like attachment 9040327 [details]. From it, when visual was RGB(24bit), readback image looses alpha channel.
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
When hardware acceleration is enabled, GLContextGLX::FindVisual() is used to choose visual. When widget does not request AlphaVisual, the FindVisual() always choose RGB(24bit) visual. It causes to loose alpha during readback.
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Description
•