summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/DrawFrameTask.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2018-05-17 10:44:00 -0700
committerJohn Reck <jreck@google.com>2018-05-31 19:55:54 +0000
commitcc2eee89c81a9b348b7283000678562f43c061c7 (patch)
treebedc526db5360761be66143df86ab9e8d5d8f6ea /libs/hwui/renderthread/DrawFrameTask.cpp
parent14e1c54fa3f38c79cc080670519e15842e248a88 (diff)
Attempting to fix the black flicker
Bug: 79231206 Test: Repro steps from bug Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index 60df514ecc2b..51eeab7e46ce 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -90,6 +90,11 @@ void DrawFrameTask::run() {
TreeInfo info(TreeInfo::MODE_FULL, *mContext);
canUnblockUiThread = syncFrameState(info);
canDrawThisFrame = info.out.canDrawThisFrame;
+
+ if (mFrameCompleteCallback) {
+ mContext->addFrameCompleteListener(std::move(mFrameCompleteCallback));
+ mFrameCompleteCallback = nullptr;
+ }
}
// Grab a copy of everything we need
@@ -152,6 +157,9 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) {
mSyncResult |= SyncResult::UIRedrawRequired;
}
}
+ if (!info.out.canDrawThisFrame) {
+ mSyncResult |= SyncResult::FrameDropped;
+ }
// If prepareTextures is false, we ran out of texture cache space
return info.prepareTextures;
}