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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 max_page_scale_factor_(0), | 69 max_page_scale_factor_(0), |
70 device_scale_factor_(1.f), | 70 device_scale_factor_(1.f), |
71 painted_device_scale_factor_(1.f), | 71 painted_device_scale_factor_(1.f), |
72 elastic_overscroll_(elastic_overscroll), | 72 elastic_overscroll_(elastic_overscroll), |
73 viewport_size_invalid_(false), | 73 viewport_size_invalid_(false), |
74 needs_update_draw_properties_(true), | 74 needs_update_draw_properties_(true), |
75 needs_full_tree_sync_(true), | 75 needs_full_tree_sync_(true), |
76 next_activation_forces_redraw_(false), | 76 next_activation_forces_redraw_(false), |
77 has_ever_been_drawn_(false), | 77 has_ever_been_drawn_(false), |
78 render_surface_layer_list_id_(0), | 78 render_surface_layer_list_id_(0), |
| 79 have_scroll_event_handlers_(false), |
79 have_wheel_event_handlers_(false), | 80 have_wheel_event_handlers_(false), |
80 top_controls_shrink_blink_size_(false), | 81 top_controls_shrink_blink_size_(false), |
81 top_controls_height_(0), | 82 top_controls_height_(0), |
82 top_controls_shown_ratio_(top_controls_shown_ratio) {} | 83 top_controls_shown_ratio_(top_controls_shown_ratio) {} |
83 | 84 |
84 LayerTreeImpl::~LayerTreeImpl() { | 85 LayerTreeImpl::~LayerTreeImpl() { |
85 BreakSwapPromises(IsActiveTree() ? SwapPromise::SWAP_FAILS | 86 BreakSwapPromises(IsActiveTree() ? SwapPromise::SWAP_FAILS |
86 : SwapPromise::ACTIVATION_FAILS); | 87 : SwapPromise::ACTIVATION_FAILS); |
87 | 88 |
88 // Need to explicitly clear the tree prior to destroying this so that | 89 // 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... |
339 overscroll_elasticity_layer_id_, page_scale_layer_id_, | 340 overscroll_elasticity_layer_id_, page_scale_layer_id_, |
340 inner_viewport_scroll_layer_id_, outer_viewport_scroll_layer_id_); | 341 inner_viewport_scroll_layer_id_, outer_viewport_scroll_layer_id_); |
341 | 342 |
342 target_tree->RegisterSelection(selection_); | 343 target_tree->RegisterSelection(selection_); |
343 | 344 |
344 // This should match the property synchronization in | 345 // This should match the property synchronization in |
345 // LayerTreeHost::finishCommitOnImplThread(). | 346 // LayerTreeHost::finishCommitOnImplThread(). |
346 target_tree->set_source_frame_number(source_frame_number()); | 347 target_tree->set_source_frame_number(source_frame_number()); |
347 target_tree->set_background_color(background_color()); | 348 target_tree->set_background_color(background_color()); |
348 target_tree->set_has_transparent_background(has_transparent_background()); | 349 target_tree->set_has_transparent_background(has_transparent_background()); |
| 350 target_tree->set_have_scroll_event_handlers(have_scroll_event_handlers()); |
349 target_tree->set_have_wheel_event_handlers(have_wheel_event_handlers()); | 351 target_tree->set_have_wheel_event_handlers(have_wheel_event_handlers()); |
350 | 352 |
351 if (ViewportSizeInvalid()) | 353 if (ViewportSizeInvalid()) |
352 target_tree->SetViewportSizeInvalid(); | 354 target_tree->SetViewportSizeInvalid(); |
353 else | 355 else |
354 target_tree->ResetViewportSizeInvalid(); | 356 target_tree->ResetViewportSizeInvalid(); |
355 | 357 |
356 if (hud_layer()) | 358 if (hud_layer()) |
357 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( | 359 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( |
358 LayerTreeHostCommon::FindLayerInSubtree( | 360 LayerTreeHostCommon::FindLayerInSubtree( |
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2041 const gfx::BoxF& box, | 2043 const gfx::BoxF& box, |
2042 gfx::BoxF* bounds) const { | 2044 gfx::BoxF* bounds) const { |
2043 *bounds = gfx::BoxF(); | 2045 *bounds = gfx::BoxF(); |
2044 return layer_tree_host_impl_->animation_host() | 2046 return layer_tree_host_impl_->animation_host() |
2045 ? layer_tree_host_impl_->animation_host() | 2047 ? layer_tree_host_impl_->animation_host() |
2046 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 2048 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
2047 : true; | 2049 : true; |
2048 } | 2050 } |
2049 | 2051 |
2050 } // namespace cc | 2052 } // namespace cc |
OLD | NEW |