summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2015-07-21 20:50:27 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-07-21 20:50:30 +0000
commit1fddd3efa9ac10e794d7bdf457b7b52c7e4614f7 (patch)
tree406d987a0baa22be8ed272c285a8b4b7b16dd35c /libs/hwui/RenderNode.cpp
parent55a116d00ca3f7b84a6af1c5c3472323ad5bc6ca (diff)
parent00e79c9947b741194ff6c0d08ede9b3befbf9c9d (diff)
Merge "Mark isInUse per-window" into mnc-dev
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 80f349aa19a2..0951fc158ace 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -214,10 +214,10 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) {
info.renderer->pushLayerUpdate(mLayer);
}
- if (CC_UNLIKELY(info.canvasContext)) {
- // If canvasContext is not null that means there are prefetched layers
- // that need to be accounted for. That might be us, so tell CanvasContext
- // that this layer is in the tree and should not be destroyed.
+ if (info.canvasContext) {
+ // There might be prefetched layers that need to be accounted for.
+ // That might be us, so tell CanvasContext that this layer is in the
+ // tree and should not be destroyed.
info.canvasContext->markLayerInUse(this);
}
}
@@ -339,7 +339,8 @@ void RenderNode::prepareSubTree(TreeInfo& info, bool functorsNeedLayer, DisplayL
TextureCache& cache = Caches::getInstance().textureCache;
info.out.hasFunctors |= subtree->functors.size();
for (size_t i = 0; info.prepareTextures && i < subtree->bitmapResources.size(); i++) {
- info.prepareTextures = cache.prefetchAndMarkInUse(subtree->bitmapResources[i]);
+ info.prepareTextures = cache.prefetchAndMarkInUse(
+ info.canvasContext, subtree->bitmapResources[i]);
}
for (size_t i = 0; i < subtree->children().size(); i++) {
DrawRenderNodeOp* op = subtree->children()[i];