Closed Bug 1690216 Opened 4 years ago Closed 4 years ago

[XMonad window manager] Developer Edition doesn't render immediately after update

Categories

(Core :: Graphics, defect, P3)

Firefox 86
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox87 --- fixed
firefox88 --- fixed

People

(Reporter: 18gatenmaker6, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

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

Steps to reproduce:

(My version is 86.0b3 (64-bit) to be precise)
Start Firefox, go to some webpage, then unfocus from Firefox. Make sure Firefox is not in sight (I switched to another workspace in XMonad). Then go back to Firefox. Don't give any mouse/keyboard inputs afterwards. (render bug will go away after scrolling the page, for example.)

Actual results:

A render bug occurs. I am unable to make a screenshot, but for a variable time Firefox just doesn't render.

Expected results:

No render bugs should have occured, the bugs look weird and broken.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
Component: Startup and Profile System → Graphics
Product: Toolkit → Core

Would you be able to capture a screen recording of this (Ctrl+Alt+Shift+R to start/stop, saved in $HOME/Videos by default)? Also, could you attach your about:support contents? Thanks!

Blocks: wr-linux
Flags: needinfo?(18gatenmaker6)
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Attached file about:support
Sure thing, here is my about:support in advance: ``` ```

I did the recording while watching youtube, because if I use a video player, the render bug occurs longer. In the clip, I scroll a bit to make the screen normal again. link

Flags: needinfo?(18gatenmaker6)
Blocks: sw-wr-correctness
No longer blocks: wr-linux
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: Developer Edition doesn't render immediately after update → [XMonad window manager] Developer Edition doesn't render immediately after update

RenderCompositorSWGL knows the true dirty region in which it needs to composite
from StartRemoteDrawingInRegion. However, SwCompositor only knows the dirty rects
that WR reports to it, which may only be a subset of what we actually need to
redraw the window. This modifies StartCompositing/start_compositing so they
can report back to us the unioned dirty rect that we actually need to consider.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

This requires us to plumb CompositorCapabilities to support the extra field.
This is complicated by the fact that since it is a Rust struct, it has no
default constructor that can pass through to C++ via bindings, so every
one of our RenderCompositors was forced to manually initialize fields. To
get around this brittle footgun, instead the structure is initialized on
the Rust side, and RenderCompositor's are encouraged to only change fields
that actually diverge from the defaults as passed in via pointer.

Finally, we can then do what we need to do, which is just to send the
ForceRedraw message that needs to happen based on what we know about
CompositorCapabilities.

It caused us substantial confusion investigating this bug under the belief that
StartRemoteDrawingInRegion may have been modifying the dirty region. None of our
existing widget code anymore uses the API in this way, so it makes sense to just
force this dirty region to be const so that we no longer support the assumption
and alleviate confusion in the future about how our widget code actually behaves.

Depends on D106246

Attachment #9205038 - Attachment is obsolete: true
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45b36995cfd6 Report whether to redraw on invalidation to WR. r=mattwoodrow
Flags: needinfo?(lsalzman)
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b16a82dcc68b Report whether to redraw on invalidation to WR. r=mattwoodrow
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6629b9999267 Clarify that StartRemoteDrawingInRegion does not actually modify the region. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Can you verify if the patch fixes the bug for you? In my local reproduction, it did seem to do the job for me.

Flags: needinfo?(18gatenmaker6)

You mean building from source or...?

(In reply to 18gatenmaker6 from comment #15)

You mean building from source or...?

It should be rolled into nightly builds by tonight.

(In reply to Lee Salzman [:lsalzman] from comment #16)

(In reply to 18gatenmaker6 from comment #15)

You mean building from source or...?

It should be rolled into nightly builds by tonight.

It should be in 20210225092306 nightly already.

Comment on attachment 9205044 [details]
Bug 1690216 - Report whether to redraw on invalidation to WR. r?mattwoodrow

Beta/Release Uplift Approval Request

  • User impact if declined: This resolves a Linux usability regression with Software WebRender. Any overlapping windows, workspace switching, etc. will cause the window to fail to repaint properly.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just forces an extra redraw when the window is damaged, but otherwise doesn't make other changes to how things are drawn.
  • String changes made/needed:
Attachment #9205044 - Flags: approval-mozilla-beta?

Okay, I will try to reproduce the bug tomorrow on the latest nightly build (right now: https://ftp.mozilla.org/pub/firefox/nightly/2021/02/2021-02-27-09-44-58-mozilla-central/firefox-88.0a1.en-US.linux-x86_64.tar.bz2 )

Flags: needinfo?(18gatenmaker6)

Comment on attachment 9205044 [details]
Bug 1690216 - Report whether to redraw on invalidation to WR. r?mattwoodrow

This needs a rebased patch for Beta.

Flags: needinfo?(lsalzman)

A file just changed name, so a fairly uneventful rebase for 87.

Flags: needinfo?(lsalzman) → needinfo?(ryanvm)
Attachment #9205953 - Attachment is patch: true

Comment on attachment 9205953 [details] [diff] [review]
Bug 1690216 - Report whether to redraw on invalidation to WR (beta 87). r=mattwoodrow

approved for 87.0b5

Flags: needinfo?(ryanvm)
Attachment #9205953 - Flags: approval-mozilla-beta+
Attachment #9205044 - Flags: approval-mozilla-beta?
Blocks: 1690759
See Also: → 1713686
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: