diff options
author | 2025-02-18 11:35:58 -0800 | |
---|---|---|
committer | 2025-02-18 19:39:07 +0000 | |
commit | aed2282953df1ed812f45ee401c7277bde4c3cfd (patch) | |
tree | dcb50293f672ed35685a627be6fa62d647f4b89d /libs/hwui/FrameInfo.cpp | |
parent | 6dd107ab7db5296496aba54ad06c60831b3e67c8 (diff) |
Pass metrics buffer as std::array
Before this change, metrics were passed around as a raw array, without clear guidance of how big the array was or how to use it. The callers had to look into the implementation to understand that to use this array, "FrameInfo.h" needed to be included, and that the array size and indices were there.
With the current refactor, it will become slightly easier to use these metrics.
Bug: 376713684
Change-Id: Iecc04a0a215a7913ca8f49e4611fb104e1cacb8e
Test: compile only
Flag: EXEMPT refactor
Diffstat (limited to 'libs/hwui/FrameInfo.cpp')
-rw-r--r-- | libs/hwui/FrameInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/FrameInfo.cpp b/libs/hwui/FrameInfo.cpp index 36feabde07eb..fa09296f647c 100644 --- a/libs/hwui/FrameInfo.cpp +++ b/libs/hwui/FrameInfo.cpp @@ -53,7 +53,7 @@ static_assert(static_cast<int>(FrameInfoIndex::NumIndexes) == 24, "Must update value in FrameMetrics.java#FRAME_STATS_COUNT (and here)"); void FrameInfo::importUiThreadInfo(int64_t* info) { - memcpy(mFrameInfo, info, UI_THREAD_FRAME_INFO_SIZE * sizeof(int64_t)); + memcpy(mFrameInfo.data(), info, UI_THREAD_FRAME_INFO_SIZE * sizeof(int64_t)); mSkippedFrameReason.reset(); } |