summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-05-08 14:10:57 -0700
committerJohn Reck <jreck@google.com>2015-05-08 14:12:32 -0700
commitaef9dc8d186bd5f78068ab2d5240b5e9c8ab44b6 (patch)
tree88f7178c62f401c570bb4c70fd4debc20055602e /libs/hwui
parenta0698b617f1efc71d5301f98aead822e266ec5d6 (diff)
downloadframeworks_base-aef9dc8d186bd5f78068ab2d5240b5e9c8ab44b6.zip
frameworks_base-aef9dc8d186bd5f78068ab2d5240b5e9c8ab44b6.tar.gz
frameworks_base-aef9dc8d186bd5f78068ab2d5240b5e9c8ab44b6.tar.bz2
Fix kSkippedFrame setting
It was only set previously if RenderThread dropped the frame, but not if the UI thread frame was dropped. Unify the two paths Change-Id: If2574edde3cb0949deed4e47f3daaddb890a1b28
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 3de3086..29c72e6 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -185,6 +185,7 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo) {
}
if (CC_UNLIKELY(!mNativeWindow.get())) {
+ mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
info.out.canDrawThisFrame = false;
return;
}
@@ -197,6 +198,10 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo) {
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
@@ -298,8 +303,6 @@ void CanvasContext::doFrame() {
prepareTree(info, frameInfo);
if (info.out.canDrawThisFrame) {
draw();
- } else {
- mCurrentFrameInfo->addFlag(FrameInfoFlags::kSkippedFrame);
}
}