am a2fd3234: am 3bfe4b47: am 1cd5afc1: am 9317d0b9: am 1fddd3ef: Merge "Mark isInUse per-window" into mnc-dev

* commit 'a2fd32348b06b22963fcc7c33179fddbd2394dbf':
  Mark isInUse per-window
This commit is contained in:
John Reck
2015-07-21 22:00:50 +00:00
committed by Android Git Automerger
7 changed files with 25 additions and 21 deletions

View File

@ -211,10 +211,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);
}
}
@ -336,7 +336,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];