From 2a7ee5280c7f7168cac0523a223a0125ad1593a0 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 1 Feb 2018 16:28:52 -0500 Subject: [PATCH] Bug 1435022 - Inline a one-line function with a confusing name. r=sotaro This function is exposed as public but only ever called from two places, both of which are inside the class. It's confusing to have it as a separate function because it just makes it harder to trace through the code. MozReview-Commit-ID: BC7mvOc9wo --HG-- extra : rebase_source : 56e2c69e158685c106e01e78e31d2df67ea6128c --- gfx/layers/ipc/CompositorVsyncScheduler.cpp | 13 +++---------- gfx/layers/ipc/CompositorVsyncScheduler.h | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/gfx/layers/ipc/CompositorVsyncScheduler.cpp b/gfx/layers/ipc/CompositorVsyncScheduler.cpp index 52ed52c800a2..cc8525703e8e 100644 --- a/gfx/layers/ipc/CompositorVsyncScheduler.cpp +++ b/gfx/layers/ipc/CompositorVsyncScheduler.cpp @@ -277,7 +277,7 @@ CompositorVsyncScheduler::Composite(TimeStamp aVsyncTimestamp) if (mNeedsComposite || mAsapScheduling) { mNeedsComposite = 0; mLastCompose = aVsyncTimestamp; - ComposeToTarget(nullptr); + mVsyncSchedulerOwner->CompositeToTarget(nullptr, nullptr); mVsyncNotificationsSkipped = 0; TimeDuration compositeFrameTotal = TimeStamp::Now() - aVsyncTimestamp; @@ -311,7 +311,8 @@ CompositorVsyncScheduler::ForceComposeToTarget(gfx::DrawTarget* aTarget, const I mVsyncNotificationsSkipped = 0; mLastCompose = TimeStamp::Now(); - ComposeToTarget(aTarget, aRect); + MOZ_ASSERT(mVsyncSchedulerOwner); + mVsyncSchedulerOwner->CompositeToTarget(aTarget, aRect); } bool @@ -367,13 +368,5 @@ CompositorVsyncScheduler::ScheduleTask(already_AddRefed aTas CompositorThreadHolder::Loop()->PostDelayedTask(Move(aTask), 0); } -void -CompositorVsyncScheduler::ComposeToTarget(gfx::DrawTarget* aTarget, const IntRect* aRect) -{ - MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread()); - MOZ_ASSERT(mVsyncSchedulerOwner); - mVsyncSchedulerOwner->CompositeToTarget(aTarget, aRect); -} - } // namespace layers } // namespace mozilla diff --git a/gfx/layers/ipc/CompositorVsyncScheduler.h b/gfx/layers/ipc/CompositorVsyncScheduler.h index 7fad742a9146..bf54119b989d 100644 --- a/gfx/layers/ipc/CompositorVsyncScheduler.h +++ b/gfx/layers/ipc/CompositorVsyncScheduler.h @@ -51,7 +51,6 @@ public: bool NotifyVsync(TimeStamp aVsyncTimestamp); void SetNeedsComposite(); - void ComposeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect = nullptr); void PostCompositeTask(TimeStamp aCompositeTimestamp); void PostVRTask(TimeStamp aTimestamp); void Destroy();