SF: Remove manual enum stringification
Upgrade to scoped enums where applicable. Pull GameMode from TimeStats
into libgui to plumb it as an enum rather than int32_t.
Bug: 185536303
Test: libsurfaceflinger_unittest
Change-Id: I81fdd24805757ef953484055ee867684eb94fecf
diff --git a/services/surfaceflinger/Scheduler/Timer.h b/services/surfaceflinger/Scheduler/Timer.h
index 69ce079..628d800 100644
--- a/services/surfaceflinger/Scheduler/Timer.h
+++ b/services/surfaceflinger/Scheduler/Timer.h
@@ -37,11 +37,20 @@
void dump(std::string& result) const final;
private:
- enum class DebugState { Reset, Running, Waiting, Reading, InCallback, Terminated };
+ enum class DebugState {
+ Reset,
+ Running,
+ Waiting,
+ Reading,
+ InCallback,
+ Terminated,
+
+ ftl_last = Terminated
+ };
+
void reset();
void cleanup();
void setDebugState(DebugState state) EXCLUDES(mMutex);
- const char* strDebugState(DebugState state) const;
int mTimerFd = -1;
int mEpollFd = -1;