summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/DrawFrameTask.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-11-07 23:01:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-07 23:01:00 +0000
commite19093cad8e67cf1db98157d0246d0141b19f808 (patch)
treee1419d670b0ae3ecff9c7276c0b8e40bb77ed1b2 /libs/hwui/renderthread/DrawFrameTask.cpp
parent09f5ca4eb607088626fd9a088f4171e76a493995 (diff)
parentf1923c368c5c08a477b9f94dea6a499798d91d4f (diff)
downloadframeworks_base-e19093cad8e67cf1db98157d0246d0141b19f808.zip
frameworks_base-e19093cad8e67cf1db98157d0246d0141b19f808.tar.gz
frameworks_base-e19093cad8e67cf1db98157d0246d0141b19f808.tar.bz2
am f1923c36: am 8dda03a0: am ca93f69c: Merge "Have an actual fallback if the surface is lost" into lmp-mr1-dev
* commit 'f1923c368c5c08a477b9f94dea6a499798d91d4f': Have an actual fallback if the surface is lost
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index dd34e09..97b31a9 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -132,6 +132,12 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) {
mLayers.clear();
mContext->prepareTree(info);
+ // This is after the prepareTree so that any pending operations
+ // (RenderNode tree state, prefetched layers, etc...) will be flushed.
+ if (CC_UNLIKELY(!mContext->hasSurface())) {
+ mSyncResult |= kSync_LostSurfaceRewardIfFound;
+ }
+
if (info.out.hasAnimations) {
if (info.out.requiresUiRedraw) {
mSyncResult |= kSync_UIRedrawRequired;