Closed Bug 1449086 Opened 2 years ago Closed 2 years ago

Webrender: Entire Browser Flashes Black When Resizing Heavy Page

Categories

(Core :: Graphics: WebRender, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: Gankra, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

With webrender, go to a fairly heavy page like http://store.channelfireball.com/landing and resize your window rapidly. You should see flashes of black, as if a frame was dropped but we still cleared the screen. Presumably this is unintended (it's pretty unpleasant). Heavy pages and rapid resizing aren't strictly necessary, they just make it easier to hit. (I first noticed it while resizing my bugzilla dashboard)

Seeing this on macos, haven't tried anything else.
I believe this is because we're not synchronously resizing properly. I believe mstange has more details.
Flags: needinfo?(mstange)
I thought that's what it was, but it looks like we have all the code that's necessary to make synchronous compositing during window resizes happen, and in a profile it looks like it all works. So I don't know why the black flashing happens.
Flags: needinfo?(mstange)
I don't see the problem in content, but I do see something sub-optimal happening to chrome.  Sotaro, you worked on resize?  Is there something more we should do to chrome resize?
Assignee: nobody → sotaro.ikeda.g
Priority: -- → P2
I saw the back flashes during resizing "about:support" page on my Mac.
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> I saw the back flashes during resizing "about:support" page on my Mac.

I also saw the back flashes during resizing "about:support" page on my Win10 PC(NVIDIA GPU) with "gfx.webrender.force-angle;false".
During the resizing, WebRenderBridgeParent::FlushRendering() is called to sync rendering. But it seems to cause the problem. It does not wait ongoing WebRender tasks.
attachment 8964490 [details] [diff] [review] addressed the problem for me on my Mac.
Even with attachment 8964490 [details] [diff] [review], I still saw the back flashes on my Win10 PC(NVIDIA GPU) with "gfx.webrender.force-angle;false". It seems like a different problem. In this case, we seems to need to wait gpu tasks finished.
attachment 8964490 [details] [diff] [review] added additional latency. It is not ideal. To avoid it, it might better to use IOSurface and CALayer like chromium in near future.
(In reply to Sotaro Ikeda [:sotaro] from comment #9)
> Even with attachment 8964490 [details] [diff] [review], I still saw the back
> flashes on my Win10 PC(NVIDIA GPU) with "gfx.webrender.force-angle;false".
> It seems like a different problem. In this case, we seems to need to wait
> gpu tasks finished.

Bug 1450879 is created for it.
See Also: → 1450879
Blocks: 1450879
See Also: 1450879
Attachment #8964490 - Flags: review?(nical.bugzilla)
Comment on attachment 8964490 [details] [diff] [review]
patch - Always call WaitFlushed() in WebRenderBridgeParent::FlushRendering()

Review of attachment 8964490 [details] [diff] [review]:
-----------------------------------------------------------------

I am not 100% certain but I think FlushRendering also affects APZ, so I'd rather let Kats have a look.
Attachment #8964490 - Flags: review?(nical.bugzilla) → review?(bugmail)
update nits.
Attachment #8964490 - Attachment is obsolete: true
Attachment #8964490 - Flags: review?(bugmail)
Attachment #8964520 - Flags: review?(bugmail)
Comment on attachment 8964520 [details] [diff] [review]
patch - Always call WaitFlushed() in WebRenderBridgeParent::FlushRendering()

Review of attachment 8964520 [details] [diff] [review]:
-----------------------------------------------------------------

This seems reasonable to me. I don't think it affects APZ.
Attachment #8964520 - Flags: review?(bugmail) → review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6afd78c1a4de
Always call WaitFlushed() in WebRenderBridgeParent::FlushRendering() r=kats
https://hg.mozilla.org/mozilla-central/rev/6afd78c1a4de
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.