| 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 settings_(settings), | 211 settings_(settings), |
| 212 visible_(false), | 212 visible_(false), |
| 213 cached_managed_memory_policy_(settings.memory_policy_), | 213 cached_managed_memory_policy_(settings.memory_policy_), |
| 214 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() && | 214 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() && |
| 215 !settings.single_thread_proxy_scheduler), | 215 !settings.single_thread_proxy_scheduler), |
| 216 // Must be initialized after is_synchronous_single_threaded_ and | 216 // Must be initialized after is_synchronous_single_threaded_ and |
| 217 // task_runner_provider_. | 217 // task_runner_provider_. |
| 218 // TODO(vmpstr): TileManager takes a scoped reftr for the task runner, | 218 // TODO(vmpstr): TileManager takes a scoped reftr for the task runner, |
| 219 // figure out if it actually needs a ref or whether it can use a raw | 219 // figure out if it actually needs a ref or whether it can use a raw |
| 220 // pointer. | 220 // pointer. |
| 221 tile_manager_(new TileManager(this, | 221 tile_manager_( |
| 222 GetTaskRunner(), | 222 new TileManager(this, |
| 223 is_synchronous_single_threaded_ | 223 GetTaskRunner(), |
| 224 ? std::numeric_limits<size_t>::max() | 224 is_synchronous_single_threaded_ |
| 225 : settings.scheduled_raster_task_limit, | 225 ? std::numeric_limits<size_t>::max() |
| 226 settings.use_partial_raster)), | 226 : settings.scheduled_raster_task_limit, |
| 227 settings.use_partial_raster, |
| 228 settings.max_preraster_distance_in_screen_pixels)), |
| 227 pinch_gesture_active_(false), | 229 pinch_gesture_active_(false), |
| 228 pinch_gesture_end_should_clear_scrolling_layer_(false), | 230 pinch_gesture_end_should_clear_scrolling_layer_(false), |
| 229 fps_counter_( | 231 fps_counter_( |
| 230 FrameRateCounter::Create(task_runner_provider_->HasImplThread())), | 232 FrameRateCounter::Create(task_runner_provider_->HasImplThread())), |
| 231 memory_history_(MemoryHistory::Create()), | 233 memory_history_(MemoryHistory::Create()), |
| 232 debug_rect_history_(DebugRectHistory::Create()), | 234 debug_rect_history_(DebugRectHistory::Create()), |
| 233 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())), | 235 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())), |
| 234 max_memory_needed_bytes_(0), | 236 max_memory_needed_bytes_(0), |
| 235 resourceless_software_draw_(false), | 237 resourceless_software_draw_(false), |
| 236 animation_host_(), | 238 animation_host_(), |
| (...skipping 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4007 const { | 4009 const { |
| 4008 return fixed_raster_scale_attempted_scale_change_history_.count() >= | 4010 return fixed_raster_scale_attempted_scale_change_history_.count() >= |
| 4009 kFixedRasterScaleAttemptedScaleChangeThreshold; | 4011 kFixedRasterScaleAttemptedScaleChangeThreshold; |
| 4010 } | 4012 } |
| 4011 | 4013 |
| 4012 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { | 4014 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
| 4013 fixed_raster_scale_attempted_scale_change_history_.set(0); | 4015 fixed_raster_scale_attempted_scale_change_history_.set(0); |
| 4014 } | 4016 } |
| 4015 | 4017 |
| 4016 } // namespace cc | 4018 } // namespace cc |
| OLD | NEW |