Closed Bug 1524168 Opened 6 years ago Closed 6 years ago

Address test_drawWindow_widget_layers.html failure with WebRender

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Regressed 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

Blocks: 1520705
Assignee: nobody → sotaro.ikeda.g
Attached patch temporal patch - Add logs (deleted) — Splinter Review

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

Attached image test failed image (deleted) —

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

(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.

Attached patch patch - Request AlphaVisual for WebRender (obsolete) (deleted) — Splinter Review

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.

Attachment #9040331 - Attachment is obsolete: true
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ce3a517eb67
Request AlphaVisual for WebRender r=jrmuizel
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Regressions: 1563142
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: