Skip to content

Commit

Permalink
Bug 1435022 - Clean up GetLastComposeTime. r=sotaro
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: CEaz01FyjSs

--HG--
extra : rebase_source : 44c92477f6374764e084249bae74639c3706b5c0
  • Loading branch information
staktrace authored and rainemak committed May 27, 2020
1 parent a2433c8 commit f508ebf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions gfx/layers/ipc/CompositorVsyncScheduler.cpp
Expand Up @@ -344,5 +344,12 @@ CompositorVsyncScheduler::ComposeToTarget(gfx::DrawTarget* aTarget, const IntRec
mVsyncSchedulerOwner->CompositeToTarget(aTarget, aRect);
}

const TimeStamp&
CompositorVsyncScheduler::GetLastComposeTime() const
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
return mLastCompose;
}

} // namespace layers
} // namespace mozilla
10 changes: 5 additions & 5 deletions gfx/layers/ipc/CompositorVsyncScheduler.h
Expand Up @@ -62,11 +62,11 @@ class CompositorVsyncScheduler
void Composite(TimeStamp aVsyncTimestamp);
void ForceComposeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect);

const TimeStamp& GetLastComposeTime()
{
return mLastCompose;
}

/**
* Return the vsync timestamp of the last or ongoing composite. Must be called
* on the compositor thread.
*/
const TimeStamp& GetLastComposeTime() const;
#ifdef COMPOSITOR_PERFORMANCE_WARNING
const TimeStamp& GetExpectedComposeStartTime()
{
Expand Down

0 comments on commit f508ebf

Please sign in to comment.