diff options
| -rw-r--r-- | services/surfaceflinger/Scheduler/LayerInfo.cpp | 3 | ||||
| -rw-r--r-- | services/surfaceflinger/Scheduler/Scheduler.cpp | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/services/surfaceflinger/Scheduler/LayerInfo.cpp b/services/surfaceflinger/Scheduler/LayerInfo.cpp index 1bc4ac2f11..5f17128f7e 100644 --- a/services/surfaceflinger/Scheduler/LayerInfo.cpp +++ b/services/surfaceflinger/Scheduler/LayerInfo.cpp @@ -55,10 +55,10 @@ void LayerInfo::setLastPresentTime(nsecs_t lastPresentTime, nsecs_t now, LayerUp bool pendingModeChange, const LayerProps& props) { lastPresentTime = std::max(lastPresentTime, static_cast<nsecs_t>(0)); - mLastUpdatedTime = std::max(lastPresentTime, now); *mLayerProps = props; switch (updateType) { case LayerUpdateType::AnimationTX: + mLastUpdatedTime = std::max(lastPresentTime, now); mLastAnimationTime = std::max(lastPresentTime, now); break; case LayerUpdateType::SetFrameRate: @@ -67,6 +67,7 @@ void LayerInfo::setLastPresentTime(nsecs_t lastPresentTime, nsecs_t now, LayerUp } FALLTHROUGH_INTENDED; case LayerUpdateType::Buffer: + mLastUpdatedTime = std::max(lastPresentTime, now); FrameTimeData frameTime = {.presentTime = lastPresentTime, .queueTime = mLastUpdatedTime, .pendingModeChange = pendingModeChange, diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp index c83d81f4d9..005ec05aab 100644 --- a/services/surfaceflinger/Scheduler/Scheduler.cpp +++ b/services/surfaceflinger/Scheduler/Scheduler.cpp @@ -663,13 +663,7 @@ void Scheduler::onLayerDestroyed(Layer* layer) { void Scheduler::recordLayerHistory(int32_t id, const LayerProps& layerProps, nsecs_t presentTime, nsecs_t now, LayerHistory::LayerUpdateType updateType) { - const auto& selectorPtr = pacesetterSelectorPtr(); - // Skip recording layer history on LayerUpdateType::SetFrameRate for MRR devices when the - // dVRR vote types are guarded (disabled) for MRR. This is to avoid activity when setting dVRR - // vote types. - if (selectorPtr->canSwitch() && - (updateType != LayerHistory::LayerUpdateType::SetFrameRate || - layerProps.setFrameRateVote.isVoteValidForMrr(selectorPtr->isVrrDevice()))) { + if (pacesetterSelectorPtr()->canSwitch()) { mLayerHistory.record(id, layerProps, presentTime, now, updateType); } } |