Closed Bug 1580153 Opened 5 years ago Closed 5 years ago

Fenix loading blank pages with webRender on

Categories

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

71 Branch
ARM64
Android
defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: ohorvath, Assigned: jnicol)

References

Details

Attachments

(2 files)

Attached image 20190910_074957.gif

Steps to reproduce:

  1. In about:config switch gfx.webrender.all to "True" and restart the browser.
  2. Load a few tabs in Fenix.
  3. Switch between tabs.

Expected results:
Every page is displayed.

Actual results:
Some tabs are blank until you scroll the page a little. Some don't load at all, you need to switch tabs a few times to eventually see the page.
recording attached.

device: Pixel 2 (Android 9), Fenix build: Nightly 9/10, GV 71

Jamie, curious if you can reproduce this?

Flags: needinfo?(jnicol)

Yes I can reproduce this. Interestingly while I can reproduce in fenix and the reference browser, I cannot in the geckoview example app

When we switch away from a tab, geckoview covers the widget in white. Then when it is notified that we've rendered the first frame for a new tab, it uncovers the widget. For some reason this first paint notification isn't getting through.

You can see that the new tab is indeed being rendered: If you switch app, in android's app switcher the content of the tab is briefly visible, as the white covering doesn't seem to be rendered during the app switch animation.

Assignee: nobody → jnicol
Flags: needinfo?(jnicol)
Priority: -- → P3

Previously after RecvResumeAndResize() we would set a flag on the root
WebRenderBridgeParent, which in turn sets a flag on the next display list it
receives that it should be treated as a first paint. Then when that display list
is finally composited, we call UiCompositorControllerParent::NotifyFirstPaint(),
which in turn tells GeckoView to uncover the widget.

After switching tabs in GeckoView browsers, however, the root
WebRenderBridgeParent does not always receive a new display list, so the widget
would not be uncovered. Instead of waiting for the next received display list to
be composited, we simply want to uncover the widget on the next composite. To
achieve this we instead set the forced-first-paint flag on the root
CompositorBridgeParent then we call NotifyFirstPaint() during
CompositorBridgeParent::NotifyPipelineRendered().

So the problem here seemed to be that when we RecvResumeAndResize we set the first paint flag on the root WebRenderBridgeParent, which in turn sets it on the TransactionId during the next RecvSetDisplayList. Only when that display list is finally composited and flushed do we uncover the window by calling NotifyFirstPaint. The problem is that when switching tab, the root WebRenderBridgeParent doesn't always receive a new display list. The non-root WRBP does seem to, but the root display list bails out early in the layout painting code, so it never sends a transaction to the WebRenderLayerManager.

Me and Jeff discussed this and decided to store the flag on the CompositorBridgeParent, and call NotifyFirstPaint on the next composite. This seems to fix the tab switching issue. However, we still feel this is not quite right. We've noticed sometimes the screen is black after restoring the app (bug 1581868) which could be related.

However, we will land this for now as it is an improvement. And can keep trying to figure it out afterwards.

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bb4b33f057f Call NotifyFirstPaint on next composite after RecvResumeAndResize. r=jrmuizel
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

about:config doesn't work anymore on Fenix, so I'm not able to verify this yet, as I need to switch the toggle.

This was verified today on Nightly 9/27.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: