Closed Bug 1479075 Opened 6 years ago Closed 6 years ago

FlushRenderingAsync is wrong

Categories

(Core :: Graphics: WebRender, enhancement)

Other Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

The "async" version of FlushRendering just means that the IPC message is async. The compositor is still expected to flush any pending paints. However, we implement it totally differently on the WR side [1], in that we don't flush anything. So if we had previously gotten a new display list, it doesn't get necessarily get flushed and we might just re-composite whatever we were showing before. This affects the tresize test with my patches for servo/webrender#2807, because as of bug 1476876 we are using the async FlushRendering - what happens is the UI process sends a new display list to the compositor and then calls FlushRendering. A lot of the time the new display list doesn't even get built into a scene before the FlushRendering runs and recomposites the old stuff. Then the display list ends up having to wait until the next vsync before it gets rendered, which inflates the tresize numbers. [1] https://searchfox.org/mozilla-central/rev/d47c829065767b6f36d29303d650bffb7c4f94a3/gfx/layers/ipc/CompositorBridgeParent.cpp#619
The talos results are showing regressions in tpaint and sessionrestore_many_windows, which unsurprisingly are two of the tests that were helped by bug 1476876. As with bug 1471962 I think we need to take these regressions for correctness.
Comment on attachment 8995657 [details] Bug 1479075 - Ensure FlushRenderingAsync actually flushes the compositor. https://reviewboard.mozilla.org/r/260038/#review267118 Looks good.
Attachment #8995657 - Flags: review?(sotaro.ikeda.g) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #0) > The "async" version of FlushRendering just means that the IPC message is > async. The compositor is still expected to flush any pending paints. > However, we implement it totally differently on the WR side [1], in that we > don't flush anything. So if we had previously gotten a new display list, it > doesn't get necessarily get flushed and we might just re-composite whatever > we were showing before. From the above, FlushFramePresentation() in WebRenderBridgeParent::FlushRendering() during RecvFlushRenderingAsync() might not be necessary.
Yeah, that's a good point, we shouldn't need to wait for the presentation on this codepath. I'll update the patch.
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2799f012459c Ensure FlushRenderingAsync actually flushes the compositor. r=sotaro
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1479796
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: