From aed2282953df1ed812f45ee401c7277bde4c3cfd Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Tue, 18 Feb 2025 11:35:58 -0800 Subject: 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 --- libs/hwui/FrameMetricsObserver.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libs/hwui/FrameMetricsObserver.h') diff --git a/libs/hwui/FrameMetricsObserver.h b/libs/hwui/FrameMetricsObserver.h index 3ea49518eecd..d267740d15c4 100644 --- a/libs/hwui/FrameMetricsObserver.h +++ b/libs/hwui/FrameMetricsObserver.h @@ -18,12 +18,14 @@ #include +#include "FrameInfo.h" + namespace android { namespace uirenderer { class FrameMetricsObserver : public VirtualLightRefBase { public: - virtual void notify(const int64_t* buffer) = 0; + virtual void notify(const FrameInfoBuffer& buffer) = 0; bool waitForPresentTime() const { return mWaitForPresentTime; }; void reportMetricsFrom(uint64_t frameNumber, int32_t surfaceControlId) { -- cgit v1.2.3-59-g8ed1b