Closed Bug 1591754 Opened 5 years ago Closed 5 years ago

Non-existent OS compositor surfaces getting destroyed during window resizing

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mstange, Assigned: gw)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

STR:

  1. Apply the patch queue ending in D50726 on macOS.
  2. Set gfx.webrender.compositor to true and go to a simple website.
  3. Aggressively resize the window.

Expected results:
No messages of the form deleting non-existent layer should be printed to the console.

Actual results:
Every now and then, lots of those messages are printed.

Priority: -- → P3
Assignee: nobody → gwatson

I haven't been able to reproduce this yet. I suspect it probably occurs when the backend is producing frames too fast, and some of them get dropped. I'll try a full optimized build, which might produce frames fast enough to repro it.

I still can't reproduce this with an optimized build. Does it still occur on your machine? Does it occur more often with specific pages?

Flags: needinfo?(mstange)

I can still reproduce it on https://news.ycombinator.com/. New window with only that page and no other tabs.

Flags: needinfo?(mstange)

For whatever reason, I still can't reproduce this locally.

However, I think I can see how this could occur. I've attached a patch that will hopefully fix the issue. Could you apply it locally and see if it fixes the issue for you?

If it does, I'll create a proper phab review for this.

Flags: needinfo?(mstange)

Yes, this patch seems to fix it! It was fairly easy to reproduce without the patch and I can't reproduce it anymore with the patch. Thanks!

Flags: needinfo?(mstange)

If the render backend is producing frames too quickly for the
renderer thread to consume, old frames are dropped in favor of
the most recent frame.

When this occurs, we need to ensure that any native surface updates
from the skipped frame are also applied. Otherwise, the state of
the native surfaces list can get out of sync between the renderer
and render backend threads.

I hit the "land this" button by mistake, but there is no way to cancel it now.

Pushed by dmalyshau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2abdbdb7ba2 Fix incorrect surface deletions when frames are skipped. r=nical
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Blocks: 1599605

Hi Glenn, is qa needed here? If so, could you provide us with some steps please? Thanks!

Flags: needinfo?(gwatson)

No need for QA on this one, thanks!

Flags: needinfo?(gwatson)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: