Loading services/surfaceflinger/Scheduler/LayerInfo.h +3 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ class LayerInfo { bool isLowActivityLayer() const { // We want to make sure that we received more than two frames from the layer // in order to check low activity. if (mElements.size() < 2) { if (mElements.size() < scheduler::LOW_ACTIVITY_BUFFERS + 1) { return false; } Loading @@ -118,7 +118,8 @@ class LayerInfo { // Check the frame before last to determine whether there is low activity. // If that frame is older than LOW_ACTIVITY_EPSILON_NS, the layer is sending // infrequent updates. if (mElements.at(mElements.size() - 2) < obsoleteEpsilon) { if (mElements.at(mElements.size() - (scheduler::LOW_ACTIVITY_BUFFERS + 1)) < obsoleteEpsilon) { return true; } Loading services/surfaceflinger/Scheduler/SchedulerUtils.h +4 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,11 @@ static constexpr uint32_t HWC2_SCREEN_OFF_CONFIG_ID = 0xffffffff; // or waiting idle in messaging app, when cursor is blinking. static constexpr std::chrono::nanoseconds OBSOLETE_TIME_EPSILON_NS = 1200ms; // Layer is considered low activity if the buffers come more than LOW_ACTIVITY_EPSILON_NS // apart. This is helping SF to vote for lower refresh rates when there is not activity // Layer is considered low activity if the LOW_ACTIVITY_BUFFERS buffers come more than // LOW_ACTIVITY_EPSILON_NS apart. // This is helping SF to vote for lower refresh rates when there is not activity // in screen. static constexpr int LOW_ACTIVITY_BUFFERS = 2; static constexpr std::chrono::nanoseconds LOW_ACTIVITY_EPSILON_NS = 250ms; // Calculates the statistical mean (average) in the data structure (array, vector). The Loading Loading
services/surfaceflinger/Scheduler/LayerInfo.h +3 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ class LayerInfo { bool isLowActivityLayer() const { // We want to make sure that we received more than two frames from the layer // in order to check low activity. if (mElements.size() < 2) { if (mElements.size() < scheduler::LOW_ACTIVITY_BUFFERS + 1) { return false; } Loading @@ -118,7 +118,8 @@ class LayerInfo { // Check the frame before last to determine whether there is low activity. // If that frame is older than LOW_ACTIVITY_EPSILON_NS, the layer is sending // infrequent updates. if (mElements.at(mElements.size() - 2) < obsoleteEpsilon) { if (mElements.at(mElements.size() - (scheduler::LOW_ACTIVITY_BUFFERS + 1)) < obsoleteEpsilon) { return true; } Loading
services/surfaceflinger/Scheduler/SchedulerUtils.h +4 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,11 @@ static constexpr uint32_t HWC2_SCREEN_OFF_CONFIG_ID = 0xffffffff; // or waiting idle in messaging app, when cursor is blinking. static constexpr std::chrono::nanoseconds OBSOLETE_TIME_EPSILON_NS = 1200ms; // Layer is considered low activity if the buffers come more than LOW_ACTIVITY_EPSILON_NS // apart. This is helping SF to vote for lower refresh rates when there is not activity // Layer is considered low activity if the LOW_ACTIVITY_BUFFERS buffers come more than // LOW_ACTIVITY_EPSILON_NS apart. // This is helping SF to vote for lower refresh rates when there is not activity // in screen. static constexpr int LOW_ACTIVITY_BUFFERS = 2; static constexpr std::chrono::nanoseconds LOW_ACTIVITY_EPSILON_NS = 250ms; // Calculates the statistical mean (average) in the data structure (array, vector). The Loading