Bug 1514640 - Use the vsync id of the skipped composite when we do a catch-up composite. r=jrmuizel

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2018-12-20 19:33:21 +00:00
Родитель c8aabb0526
Коммит 47621b964c
2 изменённых файлов: 10 добавлений и 2 удалений

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

@ -1702,7 +1702,7 @@ bool WebRenderBridgeParent::SampleAnimations(
void WebRenderBridgeParent::CompositeIfNeeded() {
if (mSkippedComposite) {
mSkippedComposite = false;
CompositeToTarget(VsyncId(), nullptr, nullptr);
CompositeToTarget(mSkippedCompositeId, nullptr, nullptr);
}
}
@ -1726,7 +1726,13 @@ void WebRenderBridgeParent::CompositeToTarget(VsyncId aId,
if (mSkippedComposite ||
wr::RenderThread::Get()->TooManyPendingFrames(mApi->GetId())) {
// Render thread is busy, try next time.
mSkippedComposite = true;
if (!mSkippedComposite) {
// Only record the vsync id for the first skipped composite,
// since this matches what we do for compressing messages
// in CompositorVsyncScheduler::PostCompositeTask.
mSkippedComposite = true;
mSkippedCompositeId = aId;
}
mPreviousFrameTimeStamp = TimeStamp();
// Record that we skipped presenting a frame for

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

@ -392,6 +392,8 @@ class WebRenderBridgeParent final : public PWebRenderBridgeParent,
wr::Epoch mWrEpoch;
wr::IdNamespace mIdNamespace;
VsyncId mSkippedCompositeId;
bool mPaused;
bool mDestroyed;
bool mReceivedDisplayList;