Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2644)

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 270823003: cc: Move gpu rasterization flag from LayerImpl to LayerTreeImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698