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

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

Issue 2054483002: Revert of cc : Make LayerImpl destruction independent of tree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 void LayerTreeHostImpl::EvictTexturesForTesting() { 1208 void LayerTreeHostImpl::EvictTexturesForTesting() {
1209 UpdateTileManagerMemoryPolicy(ManagedMemoryPolicy(0)); 1209 UpdateTileManagerMemoryPolicy(ManagedMemoryPolicy(0));
1210 } 1210 }
1211 1211
1212 void LayerTreeHostImpl::BlockNotifyReadyToActivateForTesting(bool block) { 1212 void LayerTreeHostImpl::BlockNotifyReadyToActivateForTesting(bool block) {
1213 NOTREACHED(); 1213 NOTREACHED();
1214 } 1214 }
1215 1215
1216 void LayerTreeHostImpl::ResetTreesForTesting() { 1216 void LayerTreeHostImpl::ResetTreesForTesting() {
1217 if (active_tree_) 1217 if (active_tree_)
1218 active_tree_->DetachLayers(); 1218 active_tree_->ClearLayers();
1219 active_tree_ = 1219 active_tree_ =
1220 LayerTreeImpl::create(this, active_tree()->page_scale_factor(), 1220 LayerTreeImpl::create(this, active_tree()->page_scale_factor(),
1221 active_tree()->top_controls_shown_ratio(), 1221 active_tree()->top_controls_shown_ratio(),
1222 active_tree()->elastic_overscroll()); 1222 active_tree()->elastic_overscroll());
1223 active_tree_->property_trees()->is_active = true; 1223 active_tree_->property_trees()->is_active = true;
1224 if (pending_tree_) 1224 if (pending_tree_)
1225 pending_tree_->DetachLayers(); 1225 pending_tree_->ClearLayers();
1226 pending_tree_ = nullptr; 1226 pending_tree_ = nullptr;
1227 pending_tree_duration_timer_ = nullptr; 1227 pending_tree_duration_timer_ = nullptr;
1228 if (recycle_tree_) 1228 if (recycle_tree_)
1229 recycle_tree_->DetachLayers(); 1229 recycle_tree_->ClearLayers();
1230 recycle_tree_ = nullptr; 1230 recycle_tree_ = nullptr;
1231 } 1231 }
1232 1232
1233 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const { 1233 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const {
1234 return fps_counter_->current_frame_number(); 1234 return fps_counter_->current_frame_number();
1235 } 1235 }
1236 1236
1237 void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy( 1237 void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
1238 const ManagedMemoryPolicy& policy) { 1238 const ManagedMemoryPolicy& policy) {
1239 if (!resource_pool_) 1239 if (!resource_pool_)
(...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 const { 4047 const {
4048 return fixed_raster_scale_attempted_scale_change_history_.count() >= 4048 return fixed_raster_scale_attempted_scale_change_history_.count() >=
4049 kFixedRasterScaleAttemptedScaleChangeThreshold; 4049 kFixedRasterScaleAttemptedScaleChangeThreshold;
4050 } 4050 }
4051 4051
4052 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { 4052 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() {
4053 fixed_raster_scale_attempted_scale_change_history_.set(0); 4053 fixed_raster_scale_attempted_scale_change_history_.set(0);
4054 } 4054 }
4055 4055
4056 } // namespace cc 4056 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698