Loading services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -759,9 +759,10 @@ void AidlPowerHalWrapper::setTargetWorkDuration(int64_t targetDuration) { } bool AidlPowerHalWrapper::shouldReportActualDurations() { // Report if we have never reported before or are approaching a stale session // Report if we have never reported before or will go stale next frame if (!mLastActualDurationSent.has_value() || (systemTime() - mLastActualReportTimestamp) > kStaleTimeout.count()) { (mLastTargetDurationSent + systemTime() - mLastActualReportTimestamp) > kStaleTimeout.count()) { return true; } Loading services/surfaceflinger/DisplayHardware/PowerAdvisor.h +1 −1 Original line number Diff line number Diff line Loading @@ -332,7 +332,7 @@ private: static const bool sTraceHintSessionData; static constexpr const std::chrono::nanoseconds kDefaultTarget = 16ms; // Amount of time after the last message was sent before the session goes stale // actually 100ms but we use 80 here to ideally avoid going stale // actually 100ms but we use 80 here to give some slack static constexpr const std::chrono::nanoseconds kStaleTimeout = 80ms; }; Loading Loading
services/surfaceflinger/DisplayHardware/PowerAdvisor.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -759,9 +759,10 @@ void AidlPowerHalWrapper::setTargetWorkDuration(int64_t targetDuration) { } bool AidlPowerHalWrapper::shouldReportActualDurations() { // Report if we have never reported before or are approaching a stale session // Report if we have never reported before or will go stale next frame if (!mLastActualDurationSent.has_value() || (systemTime() - mLastActualReportTimestamp) > kStaleTimeout.count()) { (mLastTargetDurationSent + systemTime() - mLastActualReportTimestamp) > kStaleTimeout.count()) { return true; } Loading
services/surfaceflinger/DisplayHardware/PowerAdvisor.h +1 −1 Original line number Diff line number Diff line Loading @@ -332,7 +332,7 @@ private: static const bool sTraceHintSessionData; static constexpr const std::chrono::nanoseconds kDefaultTarget = 16ms; // Amount of time after the last message was sent before the session goes stale // actually 100ms but we use 80 here to ideally avoid going stale // actually 100ms but we use 80 here to give some slack static constexpr const std::chrono::nanoseconds kStaleTimeout = 80ms; }; Loading