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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 active_tree_ = LayerTreeImpl::create(this); | 277 active_tree_ = LayerTreeImpl::create(this); |
278 TRACE_EVENT_OBJECT_CREATED_WITH_ID( | 278 TRACE_EVENT_OBJECT_CREATED_WITH_ID( |
279 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_); | 279 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_); |
280 | 280 |
281 if (settings.calculate_top_controls_position) { | 281 if (settings.calculate_top_controls_position) { |
282 top_controls_manager_ = | 282 top_controls_manager_ = |
283 TopControlsManager::Create(this, | 283 TopControlsManager::Create(this, |
284 settings.top_controls_height, | 284 settings.top_controls_height, |
285 settings.top_controls_show_threshold, | 285 settings.top_controls_show_threshold, |
286 settings.top_controls_hide_threshold); | 286 settings.top_controls_hide_threshold); |
| 287 |
| 288 // TODO(bokan): This is a quick fix. The browser should lock the top |
| 289 // controls to shown on creation but this appears not to work. Tracked |
| 290 // in crbug.com/417680. |
| 291 // Initialize with top controls showing. |
| 292 SetControlsTopOffset(0.f); |
287 } | 293 } |
288 } | 294 } |
289 | 295 |
290 LayerTreeHostImpl::~LayerTreeHostImpl() { | 296 LayerTreeHostImpl::~LayerTreeHostImpl() { |
291 DCHECK(proxy_->IsImplThread()); | 297 DCHECK(proxy_->IsImplThread()); |
292 TRACE_EVENT0("cc", "LayerTreeHostImpl::~LayerTreeHostImpl()"); | 298 TRACE_EVENT0("cc", "LayerTreeHostImpl::~LayerTreeHostImpl()"); |
293 TRACE_EVENT_OBJECT_DELETED_WITH_ID( | 299 TRACE_EVENT_OBJECT_DELETED_WITH_ID( |
294 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_); | 300 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_); |
295 | 301 |
296 if (input_handler_client_) { | 302 if (input_handler_client_) { |
(...skipping 3086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3383 } | 3389 } |
3384 | 3390 |
3385 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3391 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3386 std::vector<PictureLayerImpl*>::iterator it = | 3392 std::vector<PictureLayerImpl*>::iterator it = |
3387 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3393 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3388 DCHECK(it != picture_layers_.end()); | 3394 DCHECK(it != picture_layers_.end()); |
3389 picture_layers_.erase(it); | 3395 picture_layers_.erase(it); |
3390 } | 3396 } |
3391 | 3397 |
3392 } // namespace cc | 3398 } // namespace cc |
OLD | NEW |