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
This commit is contained in:
Kartikaya Gupta 2018-02-01 16:28:52 -05:00
parent 28f8d7953e
commit 2a7ee5280c
2 changed files with 3 additions and 11 deletions

View File

@ -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<CancelableRunnable> 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

View File

@ -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();