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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 scroll_affects_scroll_handler_(false), | 211 scroll_affects_scroll_handler_(false), |
212 scroll_layer_id_when_mouse_over_scrollbar_(Layer::INVALID_ID), | 212 scroll_layer_id_when_mouse_over_scrollbar_(Layer::INVALID_ID), |
213 tile_priorities_dirty_(false), | 213 tile_priorities_dirty_(false), |
214 settings_(settings), | 214 settings_(settings), |
215 visible_(false), | 215 visible_(false), |
216 cached_managed_memory_policy_(settings.memory_policy_), | 216 cached_managed_memory_policy_(settings.memory_policy_), |
217 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() && | 217 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() && |
218 !settings.single_thread_proxy_scheduler), | 218 !settings.single_thread_proxy_scheduler), |
219 // Must be initialized after is_synchronous_single_threaded_ and | 219 // Must be initialized after is_synchronous_single_threaded_ and |
220 // task_runner_provider_. | 220 // task_runner_provider_. |
221 // TODO(vmpstr): TileManager takes a scoped reftr for the task runner, | |
222 // figure out if it actually needs a ref or whether it can use a raw | |
223 // pointer. | |
224 tile_manager_(new TileManager(this, | 221 tile_manager_(new TileManager(this, |
225 GetTaskRunner(), | 222 GetTaskRunner(), |
226 is_synchronous_single_threaded_ | 223 is_synchronous_single_threaded_ |
227 ? std::numeric_limits<size_t>::max() | 224 ? std::numeric_limits<size_t>::max() |
228 : settings.scheduled_raster_task_limit, | 225 : settings.scheduled_raster_task_limit, |
229 settings.use_partial_raster)), | 226 settings.use_partial_raster)), |
230 pinch_gesture_active_(false), | 227 pinch_gesture_active_(false), |
231 pinch_gesture_end_should_clear_scrolling_layer_(false), | 228 pinch_gesture_end_should_clear_scrolling_layer_(false), |
232 fps_counter_( | 229 fps_counter_( |
233 FrameRateCounter::Create(task_runner_provider_->HasImplThread())), | 230 FrameRateCounter::Create(task_runner_provider_->HasImplThread())), |
(...skipping 3815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4049 const { | 4046 const { |
4050 return fixed_raster_scale_attempted_scale_change_history_.count() >= | 4047 return fixed_raster_scale_attempted_scale_change_history_.count() >= |
4051 kFixedRasterScaleAttemptedScaleChangeThreshold; | 4048 kFixedRasterScaleAttemptedScaleChangeThreshold; |
4052 } | 4049 } |
4053 | 4050 |
4054 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { | 4051 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
4055 fixed_raster_scale_attempted_scale_change_history_.set(0); | 4052 fixed_raster_scale_attempted_scale_change_history_.set(0); |
4056 } | 4053 } |
4057 | 4054 |
4058 } // namespace cc | 4055 } // namespace cc |
OLD | NEW |