summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorVishnu Nair <vishnun@google.com>2020-10-14 18:47:46 -0700
committerVishnu Nair <vishnun@google.com>2020-10-15 11:50:30 -0700
commit70a8f0ea9848a29c21d1ad1ce4ad5e004f2ee49a (patch)
tree918b7a812aa6893de4970c1d58c67a8d0b72457c /libs/hwui/renderthread/CanvasContext.cpp
parent9bce5e0c048de763b9f65385fe6e81e16e5f8db5 (diff)
HWUI: Finish frame callbacks before framecomplete callbacks
If returning early from a draw, there is a chance that the frame complete callbacks can execute before the frame callbacks. To fix this, explicitly wait on frame callbacks to complete. Test: Enable blast and test split screen resize Change-Id: Id0eabd4dacdccbf1ce774efaad51abae7c57d5ea
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 1ac99228c52c..eacabfd1dbf9 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -465,6 +465,7 @@ void CanvasContext::draw() {
mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame);
// Notify the callbacks, even if there's nothing to draw so they aren't waiting
// indefinitely
+ waitOnFences();
for (auto& func : mFrameCompleteCallbacks) {
std::invoke(func, mFrameNumber);
}