Attempting to fix the black flicker

Bug: 79231206
Test: Repro steps from bug

Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
This commit is contained in:
John Reck
2018-05-17 10:44:00 -07:00
parent 14e1c54fa3
commit cc2eee89c8
9 changed files with 160 additions and 10 deletions

View File

@@ -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;
}