summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2014-11-06 18:55:00 +0000
committer android-build-merger <android-build-merger@google.com> 2014-11-06 18:55:00 +0000
commit327cb3184d5f5d9f22db9ab18a07bb71081bb446 (patch)
treed1dca2b6943527bea72a37e8b0a7adc3118e3046 /libs/hwui/RenderNode.cpp
parenta6fc3b1a4bc6e6da5902335273b544b577823411 (diff)
parent9c13b8cfcc6e1d8b422488596538bd8b1f38df57 (diff)
Merge "Yank ResourceCache out of Caches" into lmp-mr1-dev
automerge: 9c13b8c * commit '9c13b8cfcc6e1d8b422488596538bd8b1f38df57': Yank ResourceCache out of Caches
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index c9ed9a7d780b..13c54993a6e4 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -98,9 +98,6 @@ void RenderNode::setStagingDisplayList(DisplayListData* data) {
mNeedsDisplayListDataSync = true;
delete mStagingDisplayListData;
mStagingDisplayListData = data;
- if (mStagingDisplayListData) {
- Caches::getInstance().registerFunctors(mStagingDisplayListData->functors.size());
- }
}
/**
@@ -305,6 +302,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) {
@@ -321,6 +322,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;