Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 9797c974b27798cd7a65185f67220914cb8220ad..bf37c5139d20b2e866efe99ebd520aa06dd0661d 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1806,12 +1806,11 @@ int LayerTreeHostImpl::memory_allocation_priority_cutoff() const { |
} |
void LayerTreeHostImpl::ReleaseTreeResources() { |
- if (active_tree_->root_layer()) |
- SendReleaseResourcesRecursive(active_tree_->root_layer()); |
- if (pending_tree_ && pending_tree_->root_layer()) |
- SendReleaseResourcesRecursive(pending_tree_->root_layer()); |
- if (recycle_tree_ && recycle_tree_->root_layer()) |
- SendReleaseResourcesRecursive(recycle_tree_->root_layer()); |
+ active_tree_->ReleaseResources(); |
+ if (pending_tree_) |
+ pending_tree_->ReleaseResources(); |
+ if (recycle_tree_) |
+ recycle_tree_->ReleaseResources(); |
EvictAllUIResources(); |
} |
@@ -2883,17 +2882,6 @@ base::TimeDelta LayerTreeHostImpl::LowFrequencyAnimationInterval() const { |
return base::TimeDelta::FromSeconds(1); |
} |
-void LayerTreeHostImpl::SendReleaseResourcesRecursive(LayerImpl* current) { |
- DCHECK(current); |
- current->ReleaseResources(); |
- if (current->mask_layer()) |
- SendReleaseResourcesRecursive(current->mask_layer()); |
- if (current->replica_layer()) |
- SendReleaseResourcesRecursive(current->replica_layer()); |
- for (size_t i = 0; i < current->children().size(); ++i) |
- SendReleaseResourcesRecursive(current->children()[i]); |
-} |
- |
std::string LayerTreeHostImpl::LayerTreeAsJson() const { |
std::string str; |
if (active_tree_->root_layer()) { |