Merge "Send metrics notification just before frame advances" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-03-12 01:31:53 +00:00
committed by Android (Google) Code Review

View File

@@ -576,6 +576,7 @@ void CanvasContext::draw() {
if (requireSwap) {
if (mExpectSurfaceStats) {
reportMetricsWithPresentTime();
std::lock_guard lock(mLast4FrameInfosMutex);
std::pair<FrameInfo*, int64_t>& next = mLast4FrameInfos.next();
next.first = mCurrentFrameInfo;
@@ -656,8 +657,6 @@ void CanvasContext::onSurfaceStatsAvailable(void* context, ASurfaceControl* cont
}
}
instance->reportMetricsWithPresentTime();
if (frameInfo != nullptr) {
if (gpuCompleteTime == -1) {
gpuCompleteTime = frameInfo->get(FrameInfoIndex::SwapBuffersCompleted);