Skip to content

Commit

Permalink
Bug 1435022 - Remove the ResumeComposition function from the vsync sc…
Browse files Browse the repository at this point in the history
…heduler. 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
  • Loading branch information
staktrace committed Feb 1, 2018
1 parent 4a13ef1 commit 28f8d79
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion gfx/layers/ipc/CompositorBridgeParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 0 additions & 8 deletions gfx/layers/ipc/CompositorVsyncScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,6 @@ CompositorVsyncScheduler::ScheduleTask(already_AddRefed<CancelableRunnable> 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)
{
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/ipc/CompositorVsyncScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 28f8d79

Please sign in to comment.