| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 LayerTreeHostImpl::LayerTreeHostImpl( | 215 LayerTreeHostImpl::LayerTreeHostImpl( |
| 216 const LayerTreeSettings& settings, | 216 const LayerTreeSettings& settings, |
| 217 LayerTreeHostImplClient* client, | 217 LayerTreeHostImplClient* client, |
| 218 Proxy* proxy, | 218 Proxy* proxy, |
| 219 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 219 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 220 SharedBitmapManager* manager, | 220 SharedBitmapManager* manager, |
| 221 int id) | 221 int id) |
| 222 : client_(client), | 222 : client_(client), |
| 223 proxy_(proxy), | 223 proxy_(proxy), |
| 224 shared_bitmap_manager_(manager), |
| 224 input_handler_client_(NULL), | 225 input_handler_client_(NULL), |
| 225 did_lock_scrolling_layer_(false), | 226 did_lock_scrolling_layer_(false), |
| 226 should_bubble_scrolls_(false), | 227 should_bubble_scrolls_(false), |
| 227 wheel_scrolling_(false), | 228 wheel_scrolling_(false), |
| 228 scroll_layer_id_when_mouse_over_scrollbar_(0), | 229 scroll_layer_id_when_mouse_over_scrollbar_(0), |
| 229 tile_priorities_dirty_(false), | 230 tile_priorities_dirty_(false), |
| 230 root_layer_scroll_offset_delegate_(NULL), | 231 root_layer_scroll_offset_delegate_(NULL), |
| 231 settings_(settings), | 232 settings_(settings), |
| 232 visible_(true), | 233 visible_(true), |
| 233 cached_managed_memory_policy_( | 234 cached_managed_memory_policy_( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 251 overdraw_bottom_height_(0.f), | 252 overdraw_bottom_height_(0.f), |
| 252 device_viewport_valid_for_tile_management_(true), | 253 device_viewport_valid_for_tile_management_(true), |
| 253 external_stencil_test_enabled_(false), | 254 external_stencil_test_enabled_(false), |
| 254 animation_registrar_(AnimationRegistrar::Create()), | 255 animation_registrar_(AnimationRegistrar::Create()), |
| 255 rendering_stats_instrumentation_(rendering_stats_instrumentation), | 256 rendering_stats_instrumentation_(rendering_stats_instrumentation), |
| 256 micro_benchmark_controller_(this), | 257 micro_benchmark_controller_(this), |
| 257 need_to_update_visible_tiles_before_draw_(false), | 258 need_to_update_visible_tiles_before_draw_(false), |
| 258 #ifndef NDEBUG | 259 #ifndef NDEBUG |
| 259 did_lose_called_(false), | 260 did_lose_called_(false), |
| 260 #endif | 261 #endif |
| 261 shared_bitmap_manager_(manager), | |
| 262 id_(id) { | 262 id_(id) { |
| 263 DCHECK(proxy_->IsImplThread()); | 263 DCHECK(proxy_->IsImplThread()); |
| 264 DidVisibilityChange(this, visible_); | 264 DidVisibilityChange(this, visible_); |
| 265 | 265 |
| 266 SetDebugState(settings.initial_debug_state); | 266 SetDebugState(settings.initial_debug_state); |
| 267 | 267 |
| 268 if (settings.calculate_top_controls_position) { | 268 if (settings.calculate_top_controls_position) { |
| 269 top_controls_manager_ = | 269 top_controls_manager_ = |
| 270 TopControlsManager::Create(this, | 270 TopControlsManager::Create(this, |
| 271 settings.top_controls_height, | 271 settings.top_controls_height, |
| (...skipping 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3018 swap_promise_monitor_.erase(monitor); | 3018 swap_promise_monitor_.erase(monitor); |
| 3019 } | 3019 } |
| 3020 | 3020 |
| 3021 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3021 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 3022 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3022 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 3023 for (; it != swap_promise_monitor_.end(); it++) | 3023 for (; it != swap_promise_monitor_.end(); it++) |
| 3024 (*it)->OnSetNeedsRedrawOnImpl(); | 3024 (*it)->OnSetNeedsRedrawOnImpl(); |
| 3025 } | 3025 } |
| 3026 | 3026 |
| 3027 } // namespace cc | 3027 } // namespace cc |
| OLD | NEW |