From 65ddb154c75126bbef8bf03494e6fd0d98ee0127 Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 2 Aug 2016 09:38:26 -0700 Subject: Fix FrameMetricsObserver crash Bug: 30587465 Someday maybe the technology will exist to allow sharing a simple constant between Java and C++, but today is not that day. Change-Id: I17694746cb8712058133cd5ea10c47b9909f740b --- libs/hwui/FrameInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/hwui/FrameInfo.cpp') diff --git a/libs/hwui/FrameInfo.cpp b/libs/hwui/FrameInfo.cpp index 09b3945c7f55..826f0bba294c 100644 --- a/libs/hwui/FrameInfo.cpp +++ b/libs/hwui/FrameInfo.cpp @@ -43,6 +43,9 @@ static_assert((sizeof(FrameInfoNames)/sizeof(FrameInfoNames[0])) == static_cast(FrameInfoIndex::NumIndexes), "size mismatch: FrameInfoNames doesn't match the enum!"); +static_assert(static_cast(FrameInfoIndex::NumIndexes) == 16, + "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)); } -- cgit v1.2.3-59-g8ed1b