summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-10-16 06:28:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-10-16 06:28:59 +0000
commit82894b8085a4ec230918a9e140ee5b55397fbb2f (patch)
tree3a3cdab0db9d0192c448f1e843a4951125301ede
parent1abd7847c4477a3a77358d2cb7123dce1d487593 (diff)
parent95cf4e70883d56acdb5da40052c5f77713e592e6 (diff)
Merge "gpuDrawTime should default to 0 when endTime is unknown"
-rw-r--r--libs/hwui/FrameInfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h
index d24eca7d00c6..bb875e35f6f7 100644
--- a/libs/hwui/FrameInfo.h
+++ b/libs/hwui/FrameInfo.h
@@ -158,7 +158,7 @@ public:
// GPU start time is approximated to the moment before swapBuffer is invoked.
// We could add an EGLSyncKHR fence at the beginning of the frame, but that is an overhead.
int64_t endTime = get(FrameInfoIndex::GpuCompleted);
- return endTime > 0 ? endTime - get(FrameInfoIndex::SwapBuffers) : -1;
+ return endTime > 0 ? endTime - get(FrameInfoIndex::SwapBuffers) : 0;
}
inline int64_t& set(FrameInfoIndex index) { return mFrameInfo[static_cast<int>(index)]; }