Closed Bug 1365196 Opened 8 years ago Closed 8 years ago

Throttle GenerateFrame()

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 1 obsolete file)

GenerateFrame() is scheduled based on vsync CompositorVsyncScheduler. It does not care about Render thread's render frame speed. If a speed of generating frame is faster than a speed of render frame. Render thread could have too many render frame tasks. There is a mechanism of throttling already by DidCompisite. But it seems not work well in some cases.
Assignee: nobody → sotaro.ikeda.g
Blocks: webrender
When soft GL renderer was used, the problem became very serious.
Attached patch patch - Throttle GenerateFrame() (obsolete) (deleted) — Splinter Review
Attachment #8868116 - Flags: review?(nical.bugzilla)
Comment on attachment 8868116 [details] [diff] [review] patch - Throttle GenerateFrame() Review of attachment 8868116 [details] [diff] [review]: ----------------------------------------------------------------- Would like to see this land soon as it fixes a slew of mochitest-media failures. ::: gfx/webrender_bindings/RenderThread.cpp @@ +249,5 @@ > + // Get the old count. > + uint32_t oldCount = 0; > + MOZ_ASSERT(mPendingFrameCounts.Get(AsUint64(aWindowId), &oldCount)); > + if (!mPendingFrameCounts.Get(AsUint64(aWindowId), &oldCount)) { > + return; Might be simpler to move the MOZ_ASSERT to be a "MOZ_ASSERT(false)" inside the if condition. That way you don't do the lookup twice. @@ +263,5 @@ > + // Get the old count. > + uint32_t oldCount = 0; > + MOZ_ASSERT(mPendingFrameCounts.Get(AsUint64(aWindowId), &oldCount)); > + if (!mPendingFrameCounts.Get(AsUint64(aWindowId), &oldCount)) { > + return; Ditto here about the assert
Attachment #8868116 - Flags: review+
Attachment #8868116 - Flags: review?(nical.bugzilla) → review+
Thanks for the review! I'll update in a next patch.
Attachment #8868116 - Attachment is obsolete: true
Attachment #8869269 - Flags: review+
Pushed by sikeda@mozilla.com: https://hg.mozilla.org/projects/graphics/rev/d1c9dd7d60de Throttle GenerateFrame() r=kats,nical
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: