summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2021-04-14 13:46:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-04-14 13:46:27 +0000
commit31164bc1ec74b0f447b621dd722ada5454039422 (patch)
treecfed5bb5bed45b8b512ac564a2240444f8c96fca /libs/hwui/renderthread/CanvasContext.cpp
parentaaeacb809306a07c558c266897de2a8438cd4392 (diff)
parent6f97e15e3be1ea7aacf4f5aa92c0bec3b729ce0a (diff)
Merge "Fix a logspam" into sc-dev
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index b2a986361b87..24821888e2eb 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -658,10 +658,14 @@ void CanvasContext::onSurfaceStatsAvailable(void* context, ASurfaceControl* cont
if (gpuCompleteTime == -1) {
gpuCompleteTime = frameInfo->get(FrameInfoIndex::SwapBuffersCompleted);
}
- if (gpuCompleteTime < frameInfo->get(FrameInfoIndex::SwapBuffers)) {
- // TODO (b/180488606): Investigate why this can happen for first frames.
- ALOGW("Impossible GPU complete time swapBuffers=%" PRIi64 " gpuComplete=%" PRIi64,
- frameInfo->get(FrameInfoIndex::SwapBuffers), gpuCompleteTime);
+ if (gpuCompleteTime < frameInfo->get(FrameInfoIndex::IssueDrawCommandsStart)) {
+ // On Vulkan the GPU commands are flushed to the GPU during IssueDrawCommands rather
+ // than after SwapBuffers. So if the GPU signals before issue draw commands, then
+ // something probably went wrong. Anything after that could just be expected
+ // pipeline differences
+ ALOGW("Impossible GPU complete time issueCommandsStart=%" PRIi64
+ " gpuComplete=%" PRIi64,
+ frameInfo->get(FrameInfoIndex::IssueDrawCommandsStart), gpuCompleteTime);
gpuCompleteTime = frameInfo->get(FrameInfoIndex::SwapBuffersCompleted);
}
frameInfo->set(FrameInfoIndex::FrameCompleted) = gpuCompleteTime;