Fix FrameMetricsObserver crash am: 65ddb154c7

am: 6e30f4c789

Change-Id: Ic1bc80f8bbd20ce73f9e32c3a7457ad876c28476
This commit is contained in:
John Reck
2016-08-02 18:24:34 +00:00
committed by android-build-merger
3 changed files with 5 additions and 1 deletions

View File

@@ -198,7 +198,7 @@ public final class FrameMetrics {
int SWAP_BUFFERS = 12;
int FRAME_COMPLETED = 13;
int FRAME_STATS_COUNT = 14; // must always be last
int FRAME_STATS_COUNT = 16; // must always be last
}
/*

View File

@@ -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));
}

View File

@@ -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
};