Closed Bug 1679215 Opened 4 years ago Closed 4 years ago

sw-wr: Wayland: Sections of the main menu disappear

Categories

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

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox83 --- unaffected
firefox84 --- unaffected
firefox85 --- disabled
firefox86 --- fixed

People

(Reporter: jan, Assigned: stransky)

References

(Blocks 2 open bugs, Regression)

Details

(4 keywords)

Attachments

(3 files, 1 obsolete file)

Gnome Wayland, Debian Testing, Intel HD Graphics 630 (KBL GT2)

Screencast: MOZ_ENABLE_WAYLAND=1 mozregression --launch 2020-11-24 --pref gfx.webrender.all:true gfx.webrender.software:true -a about:support

MOZ_ENABLE_WAYLAND=1 mozregression --good 2020-11-01 --bad 2020-11-24 --pref gfx.webrender.all:true gfx.webrender.software:true -a about:support

10:59.46 INFO: Last good revision: 58c3a2573804f12b8798c25605f7b7f01d720350
10:59.46 INFO: First bad revision: b7aedb850662ce676d7408acd4770cb2958143e1
10:59.46 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=58c3a2573804f12b8798c25605f7b7f01d720350&tochange=b7aedb850662ce676d7408acd4770cb2958143e1

b7aedb850662ce676d7408acd4770cb2958143e1 Matt Woodrow — Bug 1678493 - Use the clipped dest area when computing bands so that they're evenly spread across the pixels actually drawn. r=lsalzman
f8a0ebaa5e8ffd9e5e450f48bddb9ce6568a912a Matt Woodrow — Bug 1678493 - Pass the SwCompositor clip rect into the inner Composite code rather than intersecting if beforehand. r=lsalzman
9cec7f7add10d3aa0ce3fb61bc855a0721a85434 Matt Woodrow — Bug 1678493 - Don't support having both a native gl context and a native compositor in SwCompositor. r=lsalzman
94e770a1e9040144c40136388c2defc372ba7a88 Matt Woodrow — Bug 1678493 - Intersect the dirty rect with the compositor surface clip rect in SwCompositor. r=lsalzman

Not reproducible with Xwayland:
mozregression --launch 2020-11-24 --pref gfx.webrender.all:true gfx.webrender.software:true -a about:support

(Xwayland/X11 is already affected by bug 1674473.)

Flags: needinfo?(matt.woodrow)
Severity: -- → S4
Priority: -- → P3

Not fixed by bug 1678954 comment 6:
MOZ_ENABLE_WAYLAND=1 mozregression --repo autoland --launch 34aba2d9485ff3f38b9c5b3fa8a52c73180649dc --pref gfx.webrender.all:true gfx.webrender.software:true -a about:support

So this was not fixed by bug 1678954, but still appears to be a regression from bug 1678493?

Flags: needinfo?(jan)

I can confirm this is still reproducible on latest Nightly and it did not occur before Bug 1678493.

Yes, it seems so.

Flags: needinfo?(jan)

Martin, I suspect this is an issue in the wayland widget code, since it only affects that configuration.

My initial guess is that we're copying pixels outside of the dirty rects that were drawn.

Could you take a look please?

Flags: needinfo?(matt.woodrow) → needinfo?(stransky)

This is related to Bug 1674473. When transparent popup is drawn by basic compositor, Wayland SW backend contains a hack for Bug 1674473 and clears widget backend. The hack apparently works poorly and clears the background even when partial popup update is performed.

Assignee: nobody → stransky
Flags: needinfo?(stransky)

I expect the bug here is caused by WebRender - Bug 1678493. Although whole surface is locked for drawing, only partial surface area is updated. Wayland "redraw" detector thinks it's a complete popup redraw so underlying memory is cleared. A possible solutions may be:

  • don't draw transparent objects to wayland surfaces with blending. I'm not sure it's possible, if the blending is used for popup compositing or so.
  • use intermediate image cache for popups. That's what X11 does.
  • update webredner to lock only a part of the surface which is going to be updated.
Attached patch temporal patch - Fisable partial present (obsolete) (deleted) — Splinter Review

When partial present was disabled, I did not see the problem.

Attachment #9194622 - Attachment is obsolete: true

This bug is caused by different LayoutDeviceIntRegion& aInvalidRegion sizes passed to StartRemoteDrawingInRegion() and EndRemoteDrawingInRegion().

When StartRemoteDrawingInRegion() (issued from RenderCompositorSWGL::BeginFrame) obtains rect of whole window, it assumes that whole window is going to be repainted and we can do some optimizations here like switch wayland buffers and so on.

Lee, is it possible for webrender to pass the same sizes to both StartRemoteDrawingInRegion() and EndRemoteDrawingInRegion()?

Flags: needinfo?(lsalzman)
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(matt.woodrow)
Flags: needinfo?(lsalzman)
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(matt.woodrow)

We need to be able to delay instantiation of the drawing region until after we have the
dirty rects from start_compositing. This was currently not routed to RenderCompositor,
which is required to do this. Further, SwCompositor needs to always keep track of the
RenderCompositor that it is associated with regardless of whether or not it is a native
compositor so that this hook can be properly engaged.

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1cbff508b18 add support for StartCompositing hook to RenderCompositor. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/c98b81eac062 limit SWGL compositing to dirty region. r=mattwoodrow
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Blocks: 1683496
Regressions: 1686209

Filed Bug 1686209 as a possible regression on Wayland (may be also a bug in Wayland backend).

== Change summary for alert #28386 (as of Tue, 12 Jan 2021 15:31:03 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
10% tp5o_scroll linux64-shippable-qr e10s stylo webrender-sw 3.15 -> 2.84

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28386

Blocks: 1689245
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: