summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/DrawFrameTask.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-04-10 10:28:45 -0700
committerJohn Reck <jreck@google.com>2014-04-10 10:46:55 -0700
commit8ca3eecc2b7fe507d3482745efc4cd2567ad15a1 (patch)
tree804a5343674ab583447d7886e0197088cdd916e6 /libs/hwui/renderthread/DrawFrameTask.cpp
parent2271a91c327cee8a6c1dffcbfd3419c95d56c37e (diff)
Remove sync flush
Bug: 13952590 It was attempting to flush state changes after the canvas was destroyed, which caused layer updates to crash. Due to the removal of SetDisplayListData, the sync mode isn't able to do anything ever, so remove it. Change-Id: I1e18ce288d81fd47cc6e612afda9476f75ecef2e
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index 372d0d0084d6..cf6c8db9889a 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -30,7 +30,7 @@ namespace android {
namespace uirenderer {
namespace renderthread {
-DrawFrameTask::DrawFrameTask() : mContext(0), mTaskMode(MODE_INVALID), mRenderNode(0) {
+DrawFrameTask::DrawFrameTask() : mContext(0), mRenderNode(0) {
}
DrawFrameTask::~DrawFrameTask() {
@@ -69,23 +69,14 @@ void DrawFrameTask::drawFrame(RenderThread* renderThread) {
LOG_ALWAYS_FATAL_IF(!mRenderNode.get(), "Cannot drawFrame with no render node!");
LOG_ALWAYS_FATAL_IF(!mContext, "Cannot drawFrame with no CanvasContext!");
- postAndWait(renderThread, MODE_FULL);
+ postAndWait(renderThread);
// Reset the single-frame data
mDirty.setEmpty();
mRenderNode = 0;
}
-void DrawFrameTask::flushStateChanges(RenderThread* renderThread) {
- LOG_ALWAYS_FATAL_IF(!mContext, "Cannot drawFrame with no CanvasContext!");
-
- postAndWait(renderThread, MODE_STATE_ONLY);
-}
-
-void DrawFrameTask::postAndWait(RenderThread* renderThread, TaskMode mode) {
- LOG_ALWAYS_FATAL_IF(mode == MODE_INVALID, "That's not a real mode, silly!");
-
- mTaskMode = mode;
+void DrawFrameTask::postAndWait(RenderThread* renderThread) {
AutoMutex _lock(mLock);
renderThread->queue(this);
mSignal.wait(mLock);
@@ -97,11 +88,6 @@ void DrawFrameTask::run() {
// canUnblockUiThread is temporary until WebView has a solution for syncing frame state
bool canUnblockUiThread = syncFrameState();
- if (mTaskMode == MODE_STATE_ONLY) {
- unblockUiThread();
- return;
- }
-
// Grab a copy of everything we need
Rect dirtyCopy(mDirty);
sp<RenderNode> renderNode = mRenderNode;
@@ -125,12 +111,9 @@ bool DrawFrameTask::syncFrameState() {
bool hasFunctors = false;
mContext->processLayerUpdates(&mLayers, &hasFunctors);
- // If we don't have an mRenderNode this is a state flush only
- if (mRenderNode.get()) {
- TreeInfo info = {0};
- mRenderNode->prepareTree(info);
- hasFunctors |= info.hasFunctors;
- }
+ TreeInfo info = {0};
+ mRenderNode->prepareTree(info);
+ hasFunctors |= info.hasFunctors;
return !hasFunctors;
}