| OLD | NEW |
| 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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 if (active_tree_) | 1218 if (active_tree_) |
| 1219 active_tree_->ClearLayers(); | 1219 active_tree_->ClearLayers(); |
| 1220 active_tree_ = | 1220 active_tree_ = |
| 1221 LayerTreeImpl::create(this, active_tree()->page_scale_factor(), | 1221 LayerTreeImpl::create(this, active_tree()->page_scale_factor(), |
| 1222 active_tree()->top_controls_shown_ratio(), | 1222 active_tree()->top_controls_shown_ratio(), |
| 1223 active_tree()->elastic_overscroll()); | 1223 active_tree()->elastic_overscroll()); |
| 1224 active_tree_->property_trees()->is_active = true; | 1224 active_tree_->property_trees()->is_active = true; |
| 1225 if (pending_tree_) | 1225 if (pending_tree_) |
| 1226 pending_tree_->ClearLayers(); | 1226 pending_tree_->ClearLayers(); |
| 1227 pending_tree_ = nullptr; | 1227 pending_tree_ = nullptr; |
| 1228 pending_tree_duration_timer_ = nullptr; |
| 1228 if (recycle_tree_) | 1229 if (recycle_tree_) |
| 1229 recycle_tree_->ClearLayers(); | 1230 recycle_tree_->ClearLayers(); |
| 1230 recycle_tree_ = nullptr; | 1231 recycle_tree_ = nullptr; |
| 1231 } | 1232 } |
| 1232 | 1233 |
| 1233 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const { | 1234 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const { |
| 1234 return fps_counter_->current_frame_number(); | 1235 return fps_counter_->current_frame_number(); |
| 1235 } | 1236 } |
| 1236 | 1237 |
| 1237 void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy( | 1238 void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy( |
| (...skipping 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4047 const { | 4048 const { |
| 4048 return fixed_raster_scale_attempted_scale_change_history_.count() >= | 4049 return fixed_raster_scale_attempted_scale_change_history_.count() >= |
| 4049 kFixedRasterScaleAttemptedScaleChangeThreshold; | 4050 kFixedRasterScaleAttemptedScaleChangeThreshold; |
| 4050 } | 4051 } |
| 4051 | 4052 |
| 4052 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { | 4053 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
| 4053 fixed_raster_scale_attempted_scale_change_history_.set(0); | 4054 fixed_raster_scale_attempted_scale_change_history_.set(0); |
| 4054 } | 4055 } |
| 4055 | 4056 |
| 4056 } // namespace cc | 4057 } // namespace cc |
| OLD | NEW |