Loading services/surfaceflinger/BufferQueueLayer.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -201,7 +201,7 @@ uint64_t BufferQueueLayer::getFrameNumber() const { uint64_t frameNumber = mQueueItems[0].mFrameNumber; uint64_t frameNumber = mQueueItems[0].mFrameNumber; // The head of the queue will be dropped if there are signaled and timely frames behind it // The head of the queue will be dropped if there are signaled and timely frames behind it nsecs_t expectedPresentTime = mFlinger->mScheduler->expectedPresentTime(); nsecs_t expectedPresentTime = mFlinger->getExpectedPresentTime(); if (isRemovedFromCurrentState()) { if (isRemovedFromCurrentState()) { expectedPresentTime = 0; expectedPresentTime = 0; Loading Loading @@ -279,7 +279,7 @@ status_t BufferQueueLayer::updateTexImage(bool& recomputeVisibleRegions, nsecs_t getProducerStickyTransform() != 0, mName.string(), mOverrideScalingMode, getProducerStickyTransform() != 0, mName.string(), mOverrideScalingMode, getTransformToDisplayInverse(), mFreezeGeometryUpdates); getTransformToDisplayInverse(), mFreezeGeometryUpdates); nsecs_t expectedPresentTime = mFlinger->mScheduler->expectedPresentTime(); nsecs_t expectedPresentTime = mFlinger->getExpectedPresentTime(); if (isRemovedFromCurrentState()) { if (isRemovedFromCurrentState()) { expectedPresentTime = 0; expectedPresentTime = 0; Loading services/surfaceflinger/Scheduler/Scheduler.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -315,7 +315,7 @@ void Scheduler::setIgnorePresentFences(bool ignore) { mPrimaryDispSync->setIgnorePresentFences(ignore); mPrimaryDispSync->setIgnorePresentFences(ignore); } } nsecs_t Scheduler::expectedPresentTime() { nsecs_t Scheduler::getDispSyncExpectedPresentTime() { return mPrimaryDispSync->expectedPresentTime(); return mPrimaryDispSync->expectedPresentTime(); } } Loading services/surfaceflinger/Scheduler/Scheduler.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -150,7 +150,7 @@ public: void addResyncSample(const nsecs_t timestamp, bool* periodFlushed); void addResyncSample(const nsecs_t timestamp, bool* periodFlushed); void addPresentFence(const std::shared_ptr<FenceTime>& fenceTime); void addPresentFence(const std::shared_ptr<FenceTime>& fenceTime); void setIgnorePresentFences(bool ignore); void setIgnorePresentFences(bool ignore); nsecs_t expectedPresentTime(); nsecs_t getDispSyncExpectedPresentTime(); // Registers the layer in the scheduler, and returns the handle for future references. // Registers the layer in the scheduler, and returns the handle for future references. std::unique_ptr<scheduler::LayerHistory::LayerHandle> registerLayer(std::string const& name, std::unique_ptr<scheduler::LayerHistory::LayerHandle> registerLayer(std::string const& name, int windowType); int windowType); Loading services/surfaceflinger/SurfaceFlinger.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1667,7 +1667,7 @@ bool SurfaceFlinger::previousFrameMissed() NO_THREAD_SAFETY_ANALYSIS { nsecs_t SurfaceFlinger::getExpectedPresentTime() NO_THREAD_SAFETY_ANALYSIS { nsecs_t SurfaceFlinger::getExpectedPresentTime() NO_THREAD_SAFETY_ANALYSIS { DisplayStatInfo stats; DisplayStatInfo stats; mScheduler->getDisplayStatInfo(&stats); mScheduler->getDisplayStatInfo(&stats); const nsecs_t presentTime = mScheduler->expectedPresentTime(); const nsecs_t presentTime = mScheduler->getDispSyncExpectedPresentTime(); // Inflate the expected present time if we're targetting the next vsync. // Inflate the expected present time if we're targetting the next vsync. const nsecs_t correctedTime = const nsecs_t correctedTime = mVsyncModulator.getOffsets().sf < mPhaseOffsets->getOffsetThresholdForNextVsync() mVsyncModulator.getOffsets().sf < mPhaseOffsets->getOffsetThresholdForNextVsync() Loading Loading @@ -3681,7 +3681,7 @@ bool SurfaceFlinger::containsAnyInvalidClientState(const Vector<ComposerState>& bool SurfaceFlinger::transactionIsReadyToBeApplied(int64_t desiredPresentTime, bool SurfaceFlinger::transactionIsReadyToBeApplied(int64_t desiredPresentTime, const Vector<ComposerState>& states) { const Vector<ComposerState>& states) { nsecs_t expectedPresentTime = mScheduler->expectedPresentTime(); nsecs_t expectedPresentTime = getExpectedPresentTime(); // Do not present if the desiredPresentTime has not passed unless it is more than one second // Do not present if the desiredPresentTime has not passed unless it is more than one second // in the future. We ignore timestamps more than 1 second in the future for stability reasons. // in the future. We ignore timestamps more than 1 second in the future for stability reasons. if (desiredPresentTime >= 0 && desiredPresentTime >= expectedPresentTime && if (desiredPresentTime >= 0 && desiredPresentTime >= expectedPresentTime && Loading Loading
services/surfaceflinger/BufferQueueLayer.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -201,7 +201,7 @@ uint64_t BufferQueueLayer::getFrameNumber() const { uint64_t frameNumber = mQueueItems[0].mFrameNumber; uint64_t frameNumber = mQueueItems[0].mFrameNumber; // The head of the queue will be dropped if there are signaled and timely frames behind it // The head of the queue will be dropped if there are signaled and timely frames behind it nsecs_t expectedPresentTime = mFlinger->mScheduler->expectedPresentTime(); nsecs_t expectedPresentTime = mFlinger->getExpectedPresentTime(); if (isRemovedFromCurrentState()) { if (isRemovedFromCurrentState()) { expectedPresentTime = 0; expectedPresentTime = 0; Loading Loading @@ -279,7 +279,7 @@ status_t BufferQueueLayer::updateTexImage(bool& recomputeVisibleRegions, nsecs_t getProducerStickyTransform() != 0, mName.string(), mOverrideScalingMode, getProducerStickyTransform() != 0, mName.string(), mOverrideScalingMode, getTransformToDisplayInverse(), mFreezeGeometryUpdates); getTransformToDisplayInverse(), mFreezeGeometryUpdates); nsecs_t expectedPresentTime = mFlinger->mScheduler->expectedPresentTime(); nsecs_t expectedPresentTime = mFlinger->getExpectedPresentTime(); if (isRemovedFromCurrentState()) { if (isRemovedFromCurrentState()) { expectedPresentTime = 0; expectedPresentTime = 0; Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -315,7 +315,7 @@ void Scheduler::setIgnorePresentFences(bool ignore) { mPrimaryDispSync->setIgnorePresentFences(ignore); mPrimaryDispSync->setIgnorePresentFences(ignore); } } nsecs_t Scheduler::expectedPresentTime() { nsecs_t Scheduler::getDispSyncExpectedPresentTime() { return mPrimaryDispSync->expectedPresentTime(); return mPrimaryDispSync->expectedPresentTime(); } } Loading
services/surfaceflinger/Scheduler/Scheduler.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -150,7 +150,7 @@ public: void addResyncSample(const nsecs_t timestamp, bool* periodFlushed); void addResyncSample(const nsecs_t timestamp, bool* periodFlushed); void addPresentFence(const std::shared_ptr<FenceTime>& fenceTime); void addPresentFence(const std::shared_ptr<FenceTime>& fenceTime); void setIgnorePresentFences(bool ignore); void setIgnorePresentFences(bool ignore); nsecs_t expectedPresentTime(); nsecs_t getDispSyncExpectedPresentTime(); // Registers the layer in the scheduler, and returns the handle for future references. // Registers the layer in the scheduler, and returns the handle for future references. std::unique_ptr<scheduler::LayerHistory::LayerHandle> registerLayer(std::string const& name, std::unique_ptr<scheduler::LayerHistory::LayerHandle> registerLayer(std::string const& name, int windowType); int windowType); Loading
services/surfaceflinger/SurfaceFlinger.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1667,7 +1667,7 @@ bool SurfaceFlinger::previousFrameMissed() NO_THREAD_SAFETY_ANALYSIS { nsecs_t SurfaceFlinger::getExpectedPresentTime() NO_THREAD_SAFETY_ANALYSIS { nsecs_t SurfaceFlinger::getExpectedPresentTime() NO_THREAD_SAFETY_ANALYSIS { DisplayStatInfo stats; DisplayStatInfo stats; mScheduler->getDisplayStatInfo(&stats); mScheduler->getDisplayStatInfo(&stats); const nsecs_t presentTime = mScheduler->expectedPresentTime(); const nsecs_t presentTime = mScheduler->getDispSyncExpectedPresentTime(); // Inflate the expected present time if we're targetting the next vsync. // Inflate the expected present time if we're targetting the next vsync. const nsecs_t correctedTime = const nsecs_t correctedTime = mVsyncModulator.getOffsets().sf < mPhaseOffsets->getOffsetThresholdForNextVsync() mVsyncModulator.getOffsets().sf < mPhaseOffsets->getOffsetThresholdForNextVsync() Loading Loading @@ -3681,7 +3681,7 @@ bool SurfaceFlinger::containsAnyInvalidClientState(const Vector<ComposerState>& bool SurfaceFlinger::transactionIsReadyToBeApplied(int64_t desiredPresentTime, bool SurfaceFlinger::transactionIsReadyToBeApplied(int64_t desiredPresentTime, const Vector<ComposerState>& states) { const Vector<ComposerState>& states) { nsecs_t expectedPresentTime = mScheduler->expectedPresentTime(); nsecs_t expectedPresentTime = getExpectedPresentTime(); // Do not present if the desiredPresentTime has not passed unless it is more than one second // Do not present if the desiredPresentTime has not passed unless it is more than one second // in the future. We ignore timestamps more than 1 second in the future for stability reasons. // in the future. We ignore timestamps more than 1 second in the future for stability reasons. if (desiredPresentTime >= 0 && desiredPresentTime >= expectedPresentTime && if (desiredPresentTime >= 0 && desiredPresentTime >= expectedPresentTime && Loading