diff options
author | John Reck <jreck@google.com> | 2014-04-09 23:01:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-09 23:01:02 +0000 |
commit | 8e1f918738abf70a4dc86dbb12b386a9deea37f8 (patch) | |
tree | 2f8b775662768ed77b50ec5740e5d7af608e56c8 /libs/hwui/renderthread/DrawFrameTask.cpp | |
parent | 3c86a27d3e9044d04d0f176e59a1ebbcd774a54c (diff) | |
parent | 8de65a8e05285df52a1e6f0c1d5616dd233298a7 (diff) |
Merge "Switch DisplayListData to a staging model"
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 7b509a2040a1..6e7ec9b42ef9 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -30,18 +30,6 @@ namespace android { namespace uirenderer { namespace renderthread { -SetDisplayListData::SetDisplayListData() : mNewData(0) {} - -SetDisplayListData::SetDisplayListData(RenderNode* node, DisplayListData* newData) - : mTargetNode(node), mNewData(newData) { -} - -SetDisplayListData::~SetDisplayListData() {} - -void SetDisplayListData::apply() const { - mTargetNode->setData(mNewData); -} - DrawFrameTask::DrawFrameTask() : mContext(0), mTaskMode(MODE_INVALID), mRenderNode(0) { } @@ -52,13 +40,6 @@ void DrawFrameTask::setContext(CanvasContext* context) { mContext = context; } -void DrawFrameTask::setDisplayListData(RenderNode* renderNode, DisplayListData* newData) { - LOG_ALWAYS_FATAL_IF(!mContext, "Lifecycle violation, there's no context to setDisplayListData with!"); - - SetDisplayListData setter(renderNode, newData); - mDisplayListDataUpdates.push(setter); -} - void DrawFrameTask::addLayer(DeferredLayerUpdater* layer) { LOG_ALWAYS_FATAL_IF(!mContext, "Lifecycle violation, there's no context to addLayer with!"); @@ -143,17 +124,11 @@ void DrawFrameTask::run() { void DrawFrameTask::syncFrameState() { ATRACE_CALL(); - for (size_t i = 0; i < mDisplayListDataUpdates.size(); i++) { - const SetDisplayListData& setter = mDisplayListDataUpdates[i]; - setter.apply(); - } - mDisplayListDataUpdates.clear(); - mContext->processLayerUpdates(&mLayers); // If we don't have an mRenderNode this is a state flush only if (mRenderNode.get()) { - mRenderNode->updateProperties(); + mRenderNode->pushStagingChanges(); } } |