SF TimeStats: add a native struct in TimeRecord
In the current TimeRecord structure, add a native structure just
containing the timestamps and frame number, which will be used by game
benchmark backend.
Test: dumpsys SurfaceFlinger --timestats <see go/sf-timestats for args>
Bug: b/110208119
Change-Id: Ifad864ed04125c567ed7535713b18c9bab718035
diff --git a/services/surfaceflinger/TimeStats/TimeStats.h b/services/surfaceflinger/TimeStats/TimeStats.h
index 8318210..0b1f82e 100644
--- a/services/surfaceflinger/TimeStats/TimeStats.h
+++ b/services/surfaceflinger/TimeStats/TimeStats.h
@@ -40,14 +40,18 @@
// static const size_t MAX_NUM_LAYER_RECORDS = 200;
static const size_t MAX_NUM_TIME_RECORDS = 64;
- struct TimeRecord {
- bool ready = false;
+ struct FrameTime {
uint64_t frameNumber = 0;
nsecs_t postTime = 0;
nsecs_t latchTime = 0;
nsecs_t acquireTime = 0;
nsecs_t desiredTime = 0;
nsecs_t presentTime = 0;
+ };
+
+ struct TimeRecord {
+ bool ready = false;
+ FrameTime frameTime;
std::shared_ptr<FenceTime> acquireFence;
std::shared_ptr<FenceTime> presentFence;
};