Closed Bug 1637397 Opened 5 years ago Closed 4 years ago

Firefox on Wayland assumes compositor doesn't use buffer content outside damage rects

Categories

(Core :: Widget: Gtk, defect)

75 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1685263
Tracking Status
firefox76 --- disabled
firefox77 --- disabled
firefox78 --- disabled

People

(Reporter: wm, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Run Firefox on Wayland in Weston or a Mir based compositor (issue more pronounced in Mir)

Actual results:

Firefox flickers, and sometimes shows corrupted content

Expected results:

It should render normally. The problem is that the Wayland protocol requires apps send full and correct buffers. It also allows them to the specify damage rects, but this is only for potential optimizations, and compositors are not required to respect them. Firefox is sending buffers with incorrect data outside the damage rects, so compositors that don't respect them are drawing firefox incorrectly.

The relevant bit of the Wayland protocol:

This request is used to describe the regions where the pending
buffer is different from the current surface contents, and where
the surface therefore needs to be repainted. The compositor
ignores the parts of the damage that fall outside of the surface.
Blocks: wayland
Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Could you test with https://nightly.mozilla.org?
Is every rendering mode affected? (about:support > "Compositing")

  • Software rendering ("Basic"): open about:config, set gfx.webrender.force-disabled to true and restart Nightly
  • deprecated "OpenGL" compositor: layers.acceleration.force-enabled=true
  • "WebRender": gfx.webrender.all=true
    Would bug 1620076 fix this?

The "deprecated" compositor only sends damage for in-compositor optimization, it always renders everything. I never added the optimization that only renders partially.

WebRender without Bug 1620076 should not send damage at all.

Nightly seems just as bad on Mir, but less of a problem on Weston for some reason. Could be a result of the timing of frame events, or a different Mir-specific bug I haven't found yet. Only "Basic" has the problem. OpenGL and WebRender both render fine. I don't know about 1620076.

Can this be fixed by enabling widget.wayland-smooth-rendering (bug 1625296) on Nightly?

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #4)

Can this be fixed by enabling widget.wayland-smooth-rendering (bug 1625296) on Nightly?

No

I don't know about 1620076.

Now that it's landed, it's just WebRender on Nightly with gfx.webrender.max-partial-present-rects set to non-zero.
It reuses buffers and works fine on wlroots and mutter, would be nice if you tested it on mir too.

Marking as dup of bug 1685263 as there's more context in that bug already.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.