diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 1cf692c5d383..74715800a330 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -280,8 +280,8 @@ CompositorVsyncScheduler::CompositorVsyncScheduler(CompositorParent* aCompositor : mCompositorParent(aCompositorParent) , mLastCompose(TimeStamp::Now()) , mCurrentCompositeTask(nullptr) - , mNeedsComposite(false) , mIsObservingVsync(false) + , mNeedsComposite(0) , mVsyncNotificationsSkipped(0) , mCurrentCompositeTaskMonitor("CurrentCompositeTaskMonitor") , mSetNeedsCompositeMonitor("SetNeedsCompositeMonitor") @@ -355,7 +355,7 @@ CompositorVsyncScheduler::CancelCurrentSetNeedsCompositeTask() mSetNeedsCompositeTask->Cancel(); mSetNeedsCompositeTask = nullptr; } - mNeedsComposite = false; + mNeedsComposite = 0; } /** @@ -379,7 +379,7 @@ CompositorVsyncScheduler::SetNeedsComposite() mSetNeedsCompositeTask = nullptr; } - mNeedsComposite = true; + mNeedsComposite++; if (!mIsObservingVsync && mNeedsComposite) { ObserveVsync(); } @@ -418,7 +418,7 @@ CompositorVsyncScheduler::Composite(TimeStamp aVsyncTimestamp) DispatchTouchEvents(aVsyncTimestamp); if (mNeedsComposite || mAsapScheduling) { - mNeedsComposite = false; + mNeedsComposite = 0; mLastCompose = aVsyncTimestamp; ComposeToTarget(nullptr); mVsyncNotificationsSkipped = 0; diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 80793630d254..4264ac3c01c7 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -159,8 +159,8 @@ private: #endif bool mAsapScheduling; - bool mNeedsComposite; bool mIsObservingVsync; + uint32_t mNeedsComposite; int32_t mVsyncNotificationsSkipped; RefPtr mCompositorVsyncDispatcher; RefPtr mVsyncObserver;