зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1498092 - Add necessary forced frame rendering r=nical
This commit is contained in:
Родитель
73f65236b3
Коммит
2dae3826d6
|
@ -645,7 +645,7 @@ mozilla::ipc::IPCResult
|
|||
CompositorBridgeParent::RecvForcePresent()
|
||||
{
|
||||
if (mWrBridge) {
|
||||
mWrBridge->ScheduleGenerateFrame();
|
||||
mWrBridge->ScheduleForcedGenerateFrame();
|
||||
}
|
||||
// During the shutdown sequence mLayerManager may be null
|
||||
if (mLayerManager) {
|
||||
|
|
|
@ -1390,17 +1390,22 @@ WebRenderBridgeParent::UpdateWebRender(CompositorVsyncScheduler* aScheduler,
|
|||
mozilla::ipc::IPCResult
|
||||
WebRenderBridgeParent::RecvScheduleComposite()
|
||||
{
|
||||
if (mDestroyed) {
|
||||
ScheduleGenerateFrame();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderBridgeParent::ScheduleForcedGenerateFrame()
|
||||
{
|
||||
if (mDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Force frame rendering during next frame generation.
|
||||
wr::TransactionBuilder fastTxn(/* aUseSceneBuilderThread */ false);
|
||||
fastTxn.InvalidateRenderedFrame();
|
||||
mApi->SendTransaction(fastTxn);
|
||||
|
||||
ScheduleGenerateFrame();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
|
|
|
@ -186,6 +186,14 @@ public:
|
|||
*/
|
||||
void ScheduleGenerateFrame();
|
||||
|
||||
/**
|
||||
* Schedule forced frame rendering at next composite timing.
|
||||
*
|
||||
* WebRender could skip frame rendering if there is no update.
|
||||
* This function is used to force rendering even when there is not update.
|
||||
*/
|
||||
void ScheduleForcedGenerateFrame();
|
||||
|
||||
wr::Epoch UpdateWebRender(CompositorVsyncScheduler* aScheduler,
|
||||
wr::WebRenderAPI* aApi,
|
||||
AsyncImagePipelineManager* aImageMgr,
|
||||
|
|
Загрузка…
Ссылка в новой задаче