Merge "Send drawFinish callback even if did not draw" into rvc-dev

This commit is contained in:
Chavi Weingarten
2020-05-01 18:27:59 +00:00
committed by Android (Google) Code Review

View File

@@ -440,6 +440,12 @@ void CanvasContext::draw() {
if (dirty.isEmpty() && Properties::skipEmptyFrames && !surfaceRequiresRedraw()) {
mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame);
// Notify the callbacks, even if there's nothing to draw so they aren't waiting
// indefinitely
for (auto& func : mFrameCompleteCallbacks) {
std::invoke(func, mFrameNumber);
}
mFrameCompleteCallbacks.clear();
return;
}