diff options
Diffstat (limited to 'services/surfaceflinger/Scheduler/LayerHistory.cpp')
-rw-r--r-- | services/surfaceflinger/Scheduler/LayerHistory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/surfaceflinger/Scheduler/LayerHistory.cpp b/services/surfaceflinger/Scheduler/LayerHistory.cpp index 39e951affa..9a899c37d8 100644 --- a/services/surfaceflinger/Scheduler/LayerHistory.cpp +++ b/services/surfaceflinger/Scheduler/LayerHistory.cpp @@ -75,10 +75,9 @@ void trace(const LayerInfo& info, LayerHistory::LayerVoteType type, int fps) { } } // namespace -LayerHistory::LayerHistory(const RefreshRateConfigs& refreshRateConfigs) +LayerHistory::LayerHistory() : mTraceEnabled(traceEnabled()), mUseFrameRatePriority(useFrameRatePriority()) { LayerInfo::setTraceEnabled(mTraceEnabled); - LayerInfo::setRefreshRateConfigs(refreshRateConfigs); } LayerHistory::~LayerHistory() = default; @@ -138,7 +137,8 @@ void LayerHistory::record(Layer* layer, nsecs_t presentTime, nsecs_t now, } } -LayerHistory::Summary LayerHistory::summarize(nsecs_t now) { +LayerHistory::Summary LayerHistory::summarize(const RefreshRateConfigs& refreshRateConfigs, + nsecs_t now) { LayerHistory::Summary summary; std::lock_guard lock(mLock); @@ -151,7 +151,7 @@ LayerHistory::Summary LayerHistory::summarize(nsecs_t now) { ALOGV("%s has priority: %d %s focused", info->getName().c_str(), frameRateSelectionPriority, layerFocused ? "" : "not"); - auto vote = info->getRefreshRateVote(now); + auto vote = info->getRefreshRateVote(refreshRateConfigs, now); // Skip NoVote layer as those don't have any requirements if (vote.type == LayerHistory::LayerVoteType::NoVote) { continue; |