diff options
| author | 2014-11-06 13:04:49 -0800 | |
|---|---|---|
| committer | 2014-11-06 13:04:49 -0800 | |
| commit | 088c514cb13f3b8f8683588c2f398f18df1547c9 (patch) | |
| tree | 798905e133994e16fc1b66a8e6aedeab0eb98872 /libs/hwui/RenderNode.cpp | |
| parent | 1af72bff509bb2638c2d7a1309dbf3f03736e6fd (diff) | |
| parent | be70c7713df98d81e9e43af9e76e0e6d018a4339 (diff) | |
resolved conflicts for merge of be70c771 to master
Change-Id: I469905bef7361c18aab725778694567d1987c06d
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
| -rw-r--r-- | libs/hwui/RenderNode.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 55fc99ea69cc..e8f2bc0f46d6 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -99,9 +99,6 @@ void RenderNode::setStagingDisplayList(DisplayListData* data) { mNeedsDisplayListDataSync = true; delete mStagingDisplayListData; mStagingDisplayListData = data; - if (mStagingDisplayListData) { - Caches::getInstance().registerFunctors(mStagingDisplayListData->functors.size()); - } } /** @@ -306,6 +303,10 @@ void RenderNode::pushStagingDisplayListChanges(TreeInfo& info) { // changes in isRenderable or, in the future, bounds damageSelf(info); deleteDisplayListData(); + // TODO: Remove this caches stuff + if (mStagingDisplayListData && mStagingDisplayListData->functors.size()) { + Caches::getInstance().registerFunctors(mStagingDisplayListData->functors.size()); + } mDisplayListData = mStagingDisplayListData; mStagingDisplayListData = NULL; if (mDisplayListData) { @@ -322,6 +323,9 @@ void RenderNode::deleteDisplayListData() { for (size_t i = 0; i < mDisplayListData->children().size(); i++) { mDisplayListData->children()[i]->mRenderNode->decParentRefCount(); } + if (mDisplayListData->functors.size()) { + Caches::getInstance().unregisterFunctors(mDisplayListData->functors.size()); + } } delete mDisplayListData; mDisplayListData = NULL; |