Bug 1511797 - Allow catch up compositing to continue when we complete frame building. r=sotaro

Differential Revision: https://phabricator.services.mozilla.com/D13953

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2018-12-06 22:19:03 +00:00
Родитель 928d88aabb
Коммит ece9805dc5
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -327,6 +327,14 @@ static void NotifyDidRender(layers::CompositorBridgeParent* aBridge,
}
}
static void NotifyDidStartRender(layers::CompositorBridgeParent* aBridge) {
// Starting a render will change increment mRenderingCount, and potentially
// change whether we can allow the bridge to intiate another frame.
if (aBridge->GetWrBridge()) {
aBridge->GetWrBridge()->CompositeIfNeeded();
}
}
void RenderThread::UpdateAndRender(wr::WindowId aWindowId,
const TimeStamp& aStartTime, bool aRender,
const Maybe<gfx::IntSize>& aReadbackSize,
@ -345,6 +353,11 @@ void RenderThread::UpdateAndRender(wr::WindowId aWindowId,
TimeStamp start = TimeStamp::Now();
auto& renderer = it->second;
layers::CompositorThreadHolder::Loop()->PostTask(
NewRunnableFunction("NotifyDidStartRenderRunnable", &NotifyDidStartRender,
renderer->GetCompositorBridge()));
bool rendered = false;
RendererStats stats = {0};
if (aRender) {