diff options
| author | 2016-08-02 18:15:39 +0000 | |
|---|---|---|
| committer | 2016-08-02 18:15:39 +0000 | |
| commit | 6e30f4c7898b662804ada64bf66cb696ead3735c (patch) | |
| tree | 7f667083ebe8c481c6b6394751bcc9f5b16bf7e5 /libs | |
| parent | 1b75f9b9c57c5321567da3fe921a6626738bcc4a (diff) | |
| parent | 65ddb154c75126bbef8bf03494e6fd0d98ee0127 (diff) | |
Fix FrameMetricsObserver crash
am: 65ddb154c7
Change-Id: I48a04e9ba2674da351d227ba7f6d6069fd3e4727
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/hwui/FrameInfo.cpp | 3 | ||||
| -rw-r--r-- | libs/hwui/FrameInfo.h | 1 |
2 files changed, 4 insertions, 0 deletions
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<int>(FrameInfoIndex::NumIndexes), "size mismatch: FrameInfoNames doesn't match the enum!"); +static_assert(static_cast<int>(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)); } diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h index 1fe54591cf7e..45b57de0b504 100644 --- a/libs/hwui/FrameInfo.h +++ b/libs/hwui/FrameInfo.h @@ -52,6 +52,7 @@ enum class FrameInfoIndex { QueueBufferDuration, // Must be the last value! + // Also must be kept in sync with FrameMetrics.java#FRAME_STATS_COUNT NumIndexes }; |