Bug 1479075 - Ensure FlushRenderingAsync actually flushes the compositor. r=sotaro

MozReview-Commit-ID: AfVIwLj2YJp

--HG--
extra : rebase_source : 3c9f4af10be9ab38fb708a2be4cb9393cd7e86c7
This commit is contained in:
Kartikaya Gupta 2018-07-28 04:47:08 -04:00
parent 19803c9fee
commit 22456cd52b
3 changed files with 5 additions and 14 deletions

View File

@ -616,7 +616,7 @@ mozilla::ipc::IPCResult
CompositorBridgeParent::RecvFlushRenderingAsync()
{
if (mWrBridge) {
mWrBridge->FlushRenderingAsync();
mWrBridge->FlushRendering(false);
return IPC_OK();
}

View File

@ -1667,7 +1667,7 @@ WebRenderBridgeParent::ScheduleGenerateFrame()
}
void
WebRenderBridgeParent::FlushRendering()
WebRenderBridgeParent::FlushRendering(bool aWaitForPresent)
{
if (mDestroyed) {
return;
@ -1677,17 +1677,9 @@ WebRenderBridgeParent::FlushRendering()
// scene (which has the display list at the new window size).
FlushSceneBuilds();
FlushFrameGeneration();
FlushFramePresentation();
}
void
WebRenderBridgeParent::FlushRenderingAsync()
{
if (mDestroyed) {
return;
if (aWaitForPresent) {
FlushFramePresentation();
}
mCompositorScheduler->FlushPendingComposite();
}
void

View File

@ -168,8 +168,7 @@ public:
return mIdNamespace;
}
void FlushRendering();
void FlushRenderingAsync();
void FlushRendering(bool aWaitForPresent = true);
/**
* Schedule generating WebRender frame definitely at next composite timing.