From 28f8d7953e2edd4777952863fa3a376b92278fde Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 1 Feb 2018 16:28:50 -0500 Subject: [PATCH] Bug 1435022 - Remove the ResumeComposition function from the vsync scheduler. r=sotaro Having a resume function without a corresponding pause function seems silly. And the implementation of the function is the same as doing a force-compose, which is what the call site is intending to do. So we can just remove this function and do a force-compose instead. MozReview-Commit-ID: LimMYQhAuEk --HG-- extra : rebase_source : f10e43c4c4a6f67162b1b473de6c23d8dbdc7a8f --- gfx/layers/ipc/CompositorBridgeParent.cpp | 2 +- gfx/layers/ipc/CompositorVsyncScheduler.cpp | 8 -------- gfx/layers/ipc/CompositorVsyncScheduler.h | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index e897c8ccf84e3..06098cacf74e3 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -745,7 +745,7 @@ CompositorBridgeParent::ResumeComposition() mPaused = false; Invalidate(); - mCompositorScheduler->ResumeComposition(); + mCompositorScheduler->ForceComposeToTarget(nullptr, nullptr); // if anyone's waiting to make sure that composition really got resumed, tell them lock.NotifyAll(); diff --git a/gfx/layers/ipc/CompositorVsyncScheduler.cpp b/gfx/layers/ipc/CompositorVsyncScheduler.cpp index 391094fdf421c..52ed52c800a2d 100644 --- a/gfx/layers/ipc/CompositorVsyncScheduler.cpp +++ b/gfx/layers/ipc/CompositorVsyncScheduler.cpp @@ -367,14 +367,6 @@ CompositorVsyncScheduler::ScheduleTask(already_AddRefed aTas CompositorThreadHolder::Loop()->PostDelayedTask(Move(aTask), 0); } -void -CompositorVsyncScheduler::ResumeComposition() -{ - MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread()); - mLastCompose = TimeStamp::Now(); - ComposeToTarget(nullptr); -} - void CompositorVsyncScheduler::ComposeToTarget(gfx::DrawTarget* aTarget, const IntRect* aRect) { diff --git a/gfx/layers/ipc/CompositorVsyncScheduler.h b/gfx/layers/ipc/CompositorVsyncScheduler.h index cccbba07d5e0a..7fad742a9146e 100644 --- a/gfx/layers/ipc/CompositorVsyncScheduler.h +++ b/gfx/layers/ipc/CompositorVsyncScheduler.h @@ -51,7 +51,6 @@ class CompositorVsyncScheduler bool NotifyVsync(TimeStamp aVsyncTimestamp); void SetNeedsComposite(); - void ResumeComposition(); void ComposeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect = nullptr); void PostCompositeTask(TimeStamp aCompositeTimestamp); void PostVRTask(TimeStamp aTimestamp);