SF: Adding Scheduler information into dumpsys
Adding helper classes to keep track of how long we spend in given refresh rates.
We assume that DOZE mode is refresh rate 30 Hz. The other rates we get from the
list of configs stored on the device.
Currently assuming there are up to three modes:
enum class RefreshRateType { POWER_SAVING, DEFAULT, PERFORMANCE };
Test: Tests for the classes coming in next CL.
Bug: 113612090
Change-Id: I6c8226ebdb4bcdffab457121d408500973c7f89e
diff --git a/services/surfaceflinger/Scheduler/SchedulerUtils.h b/services/surfaceflinger/Scheduler/SchedulerUtils.h
index 17c57db..edd23de 100644
--- a/services/surfaceflinger/Scheduler/SchedulerUtils.h
+++ b/services/surfaceflinger/Scheduler/SchedulerUtils.h
@@ -26,6 +26,11 @@
// about layers.
static constexpr size_t ARRAY_SIZE = 30;
+// This number is used to have a place holder for when the screen is not NORMAL/ON. Currently
+// the config is not visible to SF, and is completely maintained by HWC. However, we would
+// still like to keep track of time when the device is in this config.
+static constexpr int SCREEN_OFF_CONFIG_ID = -1;
+
// Calculates the statistical mean (average) in the data structure (array, vector). The
// function does not modify the contents of the array.
template <typename T>