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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 502453003: cc: Remove tiles from recycle tree that were deleted on active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't maintain recycled twin Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 active_tree_->DetachLayerTree(); 1161 active_tree_->DetachLayerTree();
1162 active_tree_ = LayerTreeImpl::create(this); 1162 active_tree_ = LayerTreeImpl::create(this);
1163 if (pending_tree_) 1163 if (pending_tree_)
1164 pending_tree_->DetachLayerTree(); 1164 pending_tree_->DetachLayerTree();
1165 pending_tree_.reset(); 1165 pending_tree_.reset();
1166 if (recycle_tree_) 1166 if (recycle_tree_)
1167 recycle_tree_->DetachLayerTree(); 1167 recycle_tree_->DetachLayerTree();
1168 recycle_tree_.reset(); 1168 recycle_tree_.reset();
1169 } 1169 }
1170 1170
1171 void LayerTreeHostImpl::ResetRecycleTreeForTesting() {
1172 if (recycle_tree_)
1173 recycle_tree_->DetachLayerTree();
1174 recycle_tree_.reset();
1175 }
1176
1171 void LayerTreeHostImpl::EnforceManagedMemoryPolicy( 1177 void LayerTreeHostImpl::EnforceManagedMemoryPolicy(
1172 const ManagedMemoryPolicy& policy) { 1178 const ManagedMemoryPolicy& policy) {
1173 1179
1174 bool evicted_resources = client_->ReduceContentsTextureMemoryOnImplThread( 1180 bool evicted_resources = client_->ReduceContentsTextureMemoryOnImplThread(
1175 visible_ ? policy.bytes_limit_when_visible : 0, 1181 visible_ ? policy.bytes_limit_when_visible : 0,
1176 ManagedMemoryPolicy::PriorityCutoffToValue( 1182 ManagedMemoryPolicy::PriorityCutoffToValue(
1177 visible_ ? policy.priority_cutoff_when_visible 1183 visible_ ? policy.priority_cutoff_when_visible
1178 : gpu::MemoryAllocation::CUTOFF_ALLOW_NOTHING)); 1184 : gpu::MemoryAllocation::CUTOFF_ALLOW_NOTHING));
1179 if (evicted_resources) { 1185 if (evicted_resources) {
1180 active_tree_->SetContentsTexturesPurged(); 1186 active_tree_->SetContentsTexturesPurged();
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3348 } 3354 }
3349 3355
3350 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3356 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3351 std::vector<PictureLayerImpl*>::iterator it = 3357 std::vector<PictureLayerImpl*>::iterator it =
3352 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3358 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3353 DCHECK(it != picture_layers_.end()); 3359 DCHECK(it != picture_layers_.end());
3354 picture_layers_.erase(it); 3360 picture_layers_.erase(it);
3355 } 3361 }
3356 3362
3357 } // namespace cc 3363 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698