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_impl.h" | 5 #include "cc/trees/layer_tree_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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 max_page_scale_factor_(0), | 78 max_page_scale_factor_(0), |
79 device_scale_factor_(1.f), | 79 device_scale_factor_(1.f), |
80 painted_device_scale_factor_(1.f), | 80 painted_device_scale_factor_(1.f), |
81 elastic_overscroll_(elastic_overscroll), | 81 elastic_overscroll_(elastic_overscroll), |
82 viewport_size_invalid_(false), | 82 viewport_size_invalid_(false), |
83 needs_update_draw_properties_(true), | 83 needs_update_draw_properties_(true), |
84 needs_full_tree_sync_(true), | 84 needs_full_tree_sync_(true), |
85 next_activation_forces_redraw_(false), | 85 next_activation_forces_redraw_(false), |
86 has_ever_been_drawn_(false), | 86 has_ever_been_drawn_(false), |
87 render_surface_layer_list_id_(0), | 87 render_surface_layer_list_id_(0), |
| 88 have_scroll_event_handlers_(false), |
88 have_wheel_event_handlers_(false), | 89 have_wheel_event_handlers_(false), |
89 top_controls_shrink_blink_size_(false), | 90 top_controls_shrink_blink_size_(false), |
90 top_controls_height_(0), | 91 top_controls_height_(0), |
91 top_controls_shown_ratio_(top_controls_shown_ratio) {} | 92 top_controls_shown_ratio_(top_controls_shown_ratio) {} |
92 | 93 |
93 LayerTreeImpl::~LayerTreeImpl() { | 94 LayerTreeImpl::~LayerTreeImpl() { |
94 BreakSwapPromises(IsActiveTree() ? SwapPromise::SWAP_FAILS | 95 BreakSwapPromises(IsActiveTree() ? SwapPromise::SWAP_FAILS |
95 : SwapPromise::ACTIVATION_FAILS); | 96 : SwapPromise::ACTIVATION_FAILS); |
96 | 97 |
97 // Need to explicitly clear the tree prior to destroying this so that | 98 // Need to explicitly clear the tree prior to destroying this so that |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 overscroll_elasticity_layer_id_, page_scale_layer_id_, | 349 overscroll_elasticity_layer_id_, page_scale_layer_id_, |
349 inner_viewport_scroll_layer_id_, outer_viewport_scroll_layer_id_); | 350 inner_viewport_scroll_layer_id_, outer_viewport_scroll_layer_id_); |
350 | 351 |
351 target_tree->RegisterSelection(selection_); | 352 target_tree->RegisterSelection(selection_); |
352 | 353 |
353 // This should match the property synchronization in | 354 // This should match the property synchronization in |
354 // LayerTreeHost::finishCommitOnImplThread(). | 355 // LayerTreeHost::finishCommitOnImplThread(). |
355 target_tree->set_source_frame_number(source_frame_number()); | 356 target_tree->set_source_frame_number(source_frame_number()); |
356 target_tree->set_background_color(background_color()); | 357 target_tree->set_background_color(background_color()); |
357 target_tree->set_has_transparent_background(has_transparent_background()); | 358 target_tree->set_has_transparent_background(has_transparent_background()); |
| 359 target_tree->set_have_scroll_event_handlers(have_scroll_event_handlers()); |
358 target_tree->set_have_wheel_event_handlers(have_wheel_event_handlers()); | 360 target_tree->set_have_wheel_event_handlers(have_wheel_event_handlers()); |
359 | 361 |
360 if (ViewportSizeInvalid()) | 362 if (ViewportSizeInvalid()) |
361 target_tree->SetViewportSizeInvalid(); | 363 target_tree->SetViewportSizeInvalid(); |
362 else | 364 else |
363 target_tree->ResetViewportSizeInvalid(); | 365 target_tree->ResetViewportSizeInvalid(); |
364 | 366 |
365 if (hud_layer()) | 367 if (hud_layer()) |
366 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( | 368 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( |
367 LayerTreeHostCommon::FindLayerInSubtree( | 369 LayerTreeHostCommon::FindLayerInSubtree( |
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 const gfx::BoxF& box, | 2056 const gfx::BoxF& box, |
2055 gfx::BoxF* bounds) const { | 2057 gfx::BoxF* bounds) const { |
2056 *bounds = gfx::BoxF(); | 2058 *bounds = gfx::BoxF(); |
2057 return layer_tree_host_impl_->animation_host() | 2059 return layer_tree_host_impl_->animation_host() |
2058 ? layer_tree_host_impl_->animation_host() | 2060 ? layer_tree_host_impl_->animation_host() |
2059 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 2061 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
2060 : true; | 2062 : true; |
2061 } | 2063 } |
2062 | 2064 |
2063 } // namespace cc | 2065 } // namespace cc |
OLD | NEW |