summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/DrawFrameTask.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-04-06 07:50:47 -0700
committerJohn Reck <jreck@google.com>2016-04-07 14:10:43 -0700
commit51f2d606dcbfba3cc5b03dfea37c1304b91c232f (patch)
tree110249f497eddafcb33ba8aed6989bd965b2a7da /libs/hwui/renderthread/DrawFrameTask.cpp
parent3397c88f7900d8db677204cdbe9e7a5dc26e453a (diff)
Fix some edge cases
Bug: 27709981 This desperately needs a refactor, but to keep the current (really needed & nice) behavior of dispatching after sync finishes would be difficult to handle cleanly without lots of ripping so... #yolo Change-Id: I831a06c6ae7412a062720d68ecbe3085190f0258
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index e8b9725fe808..651aaa23e341 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -65,11 +65,12 @@ void DrawFrameTask::removeLayerUpdate(DeferredLayerUpdater* layer) {
}
}
-int DrawFrameTask::drawFrame() {
+int DrawFrameTask::drawFrame(TreeObserver* observer) {
LOG_ALWAYS_FATAL_IF(!mContext, "Cannot drawFrame with no CanvasContext!");
mSyncResult = kSync_OK;
mSyncQueued = systemTime(CLOCK_MONOTONIC);
+ mObserver = observer;
postAndWait();
return mSyncResult;
@@ -88,6 +89,7 @@ void DrawFrameTask::run() {
bool canDrawThisFrame;
{
TreeInfo info(TreeInfo::MODE_FULL, *mContext);
+ info.observer = mObserver;
canUnblockUiThread = syncFrameState(info);
canDrawThisFrame = info.out.canDrawThisFrame;
}