Bug 1499186 Part 1 - Allow recording/replaying processes to ignore vsyncs, r=nical.

--HG--
extra : rebase_source : e36cb48b5a7ba3b4f2fc46fd68256b46801f0792
This commit is contained in:
Brian Hackett 2018-10-17 10:18:50 -06:00
parent e1cc56fa0f
commit 0ec2f258e7
3 changed files with 6 additions and 10 deletions

View File

@ -771,10 +771,6 @@ ShadowLayerForwarder::EndTransaction(const nsIntRegion& aRegionToClear,
// finish. If it does we don't have to delay messages at all.
GetCompositorBridgeChild()->PostponeMessagesIfAsyncPainting();
if (recordreplay::IsRecordingOrReplaying()) {
recordreplay::child::NotifyPaintStart();
}
MOZ_LAYERS_LOG(("[LayersForwarder] sending transaction..."));
RenderTraceScope rendertrace3("Forward Transaction", "000093");
if (!mShadowManager->SendUpdate(info)) {
@ -787,9 +783,8 @@ ShadowLayerForwarder::EndTransaction(const nsIntRegion& aRegionToClear,
mShadowManager->SendRecordPaintTimes(mPaintTiming);
}
// Create a record/replay checkpoint after each paint.
if (recordreplay::IsRecordingOrReplaying()) {
recordreplay::child::CreateCheckpoint();
recordreplay::child::NotifyPaintStart();
}
*aSent = true;

View File

@ -69,8 +69,8 @@ VsyncChild::RecvNotify(const TimeStamp& aVsyncTimestamp)
SchedulerGroup::MarkVsyncRan();
if (mObservingVsync && mObserver) {
if (recordreplay::IsRecordingOrReplaying()) {
recordreplay::child::OnVsync();
if (recordreplay::IsRecordingOrReplaying() && !recordreplay::child::OnVsync()) {
return IPC_OK();
}
mObserver->NotifyVsync(aVsyncTimestamp);

View File

@ -43,8 +43,9 @@ void CreateCheckpoint();
// graphics when paused.
void SetVsyncObserver(VsyncObserver* aObserver);
// Called before processing incoming vsyncs from the UI process.
void OnVsync();
// Called before processing incoming vsyncs from the UI process. Returns false
// if the vsync should be ignored.
bool OnVsync();
// Tell the child code about any ongoing painting activity. When a paint is
// about to happen, the main thread calls NotifyPaintStart, and when the