Merge "Fix kSkippedFrame setting" into mnc-dev
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 436946f..733e5e0 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -171,6 +171,7 @@
}
if (CC_UNLIKELY(!mNativeWindow.get())) {
+ mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
info.out.canDrawThisFrame = false;
return;
}
@@ -183,6 +184,10 @@
NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND, &runningBehind);
info.out.canDrawThisFrame = !runningBehind;
+ if (!info.out.canDrawThisFrame) {
+ mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
+ }
+
if (info.out.hasAnimations || !info.out.canDrawThisFrame) {
if (!info.out.requiresUiRedraw) {
// If animationsNeedsRedraw is set don't bother posting for an RT anim
@@ -284,8 +289,6 @@
prepareTree(info, frameInfo);
if (info.out.canDrawThisFrame) {
draw();
- } else {
- mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
}
}