Closed Bug 1459242 Opened 3 years ago Closed 3 years ago
Need some way to trigger a render/composite after a long scene build is done
With the patch on bug 1457466 I'm running into another issue I hadn't noticed before, which is that sometimes after scrolling the visible screen area is only partially drawn (or not drawn at all). I believe this happens because there's a long scene build, and we do the associated GenerateFrame transaction  on the RB thread concurrently with the scene build. After the scene build is done, the scene swap happens but there's nothing to actually trigger the render for the new scene because all the inflight renders are done and gecko is now "idle". We could ensure that all the SetDisplayList transactions also have GenerateFrame on them but when I tried that it resulted in a lot of extra rendering because each scene build would trigger a render instead of just doing one every vsync. Really what we want is some mechanism to trigger a render on the vsync following the scene swap.  https://searchfox.org/mozilla-central/rev/c0d81882c7941c4ff13a50603e37095cdab0d1ea/gfx/layers/wr/WebRenderBridgeParent.cpp#657
The attached patch does the job, but it's a hack because it's putting the code into APZ where it doesn't belong. Really what we want is to invoke the CompositorBridgeParent::ScheduleRenderOnCompositorThread() function from the post_scene_swap hook in bindings.rs, so that'll involve some more plumbing probably.
Assignee: nobody → bugmail
3 years ago
Priority: -- → P1
I'll just fix this as part of bug 1457466, since this isn't a problem without the patch on that bug, and it doesn't need any upstream WR changes.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1457466
You need to log in before you can comment on or make changes to this bug.