Closed Bug 1395989 Opened 7 years ago Closed 7 years ago

Ensure video elements don't cause the scene to be rebuilt every frame

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
Tracking Status
firefox56 --- unaffected
firefox57 --- unaffected

People

(Reporter: nical, Assigned: nical)

References

Details

(Whiteboard: [wr-mvp] gfx-noted)

The way we currently pass video frames to webrender involves re-building a small display list for the video element each time, which causes webrender to internally re-build its scene, re-compute batches, and regenerate the render frames. In the vast majority of cases all we need is to swap out a few texture ids for the video element, we should only re-build the scene when we have to (sizes and/or formats change).
Priority: P3 → P2
Whiteboard: gfx-noted → [wr-mvp] gfx-noted
Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
Priority: P2 → P1
The work that this bug was intended for is in place, and I have verified that we rarely re-build the scene while playing a simple video (that is the most simple test: load a video from disk and play it in firefox). So I think that we can close this now.
Unfortunately, in some sites including youtube we keep rebuilding scenes continuously. I don't know if that's because of how we forward video frames or if something else is causing a lot more invalidation that necessary, but we should investigate. I also found that we sometimes build the scene several times before rendering the frame which is a lot of wasted work.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.