diff options
| author | 2024-04-09 20:42:16 +0000 | |
|---|---|---|
| committer | 2024-04-09 20:42:16 +0000 | |
| commit | 2b18403fa8be717809e5c25636362e68dbc8728c (patch) | |
| tree | 4474ed7956f2a63c3b315def92ed0862cd4099e3 | |
| parent | c8c4df5bf95fedea8f649a034d4b5ac42c39d5b1 (diff) | |
| parent | f8fdc458c555f46462c4fe59c990b57bc94bc8bc (diff) | |
Merge "SF: do not update mLastUpdatedTime for SetFrameRate" into main
| -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); } } |