Merge "Send drawFinish callback even if did not draw" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
882ba30b8a
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user