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 <limits> | 7 #include <limits> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 min_page_scale_factor_(0), | 89 min_page_scale_factor_(0), |
90 max_page_scale_factor_(0), | 90 max_page_scale_factor_(0), |
91 scrolling_layer_id_from_previous_tree_(0), | 91 scrolling_layer_id_from_previous_tree_(0), |
92 contents_textures_purged_(false), | 92 contents_textures_purged_(false), |
93 viewport_size_invalid_(false), | 93 viewport_size_invalid_(false), |
94 needs_update_draw_properties_(true), | 94 needs_update_draw_properties_(true), |
95 needs_full_tree_sync_(true), | 95 needs_full_tree_sync_(true), |
96 next_activation_forces_redraw_(false), | 96 next_activation_forces_redraw_(false), |
97 has_ever_been_drawn_(false), | 97 has_ever_been_drawn_(false), |
98 render_surface_layer_list_id_(0), | 98 render_surface_layer_list_id_(0), |
99 top_controls_layout_height_(0), | 99 top_controls_shrink_blink_size_(false), |
| 100 top_controls_height_(0), |
100 top_controls_content_offset_(0), | 101 top_controls_content_offset_(0), |
101 top_controls_delta_(0), | 102 top_controls_delta_(0), |
102 sent_top_controls_delta_(0) { | 103 sent_top_controls_delta_(0) { |
103 } | 104 } |
104 | 105 |
105 LayerTreeImpl::~LayerTreeImpl() { | 106 LayerTreeImpl::~LayerTreeImpl() { |
106 BreakSwapPromises(SwapPromise::SWAP_FAILS); | 107 BreakSwapPromises(SwapPromise::SWAP_FAILS); |
107 | 108 |
108 // Need to explicitly clear the tree prior to destroying this so that | 109 // Need to explicitly clear the tree prior to destroying this so that |
109 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. | 110 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // The request queue should have been processed and does not require a push. | 203 // The request queue should have been processed and does not require a push. |
203 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); | 204 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); |
204 | 205 |
205 if (next_activation_forces_redraw_) { | 206 if (next_activation_forces_redraw_) { |
206 target_tree->ForceRedrawNextActivation(); | 207 target_tree->ForceRedrawNextActivation(); |
207 next_activation_forces_redraw_ = false; | 208 next_activation_forces_redraw_ = false; |
208 } | 209 } |
209 | 210 |
210 target_tree->PassSwapPromises(&swap_promise_list_); | 211 target_tree->PassSwapPromises(&swap_promise_list_); |
211 | 212 |
212 target_tree->top_controls_layout_height_ = top_controls_layout_height_; | 213 target_tree->top_controls_shrink_blink_size_ = |
| 214 top_controls_shrink_blink_size_; |
| 215 target_tree->top_controls_height_ = top_controls_height_; |
213 target_tree->top_controls_content_offset_ = top_controls_content_offset_; | 216 target_tree->top_controls_content_offset_ = top_controls_content_offset_; |
214 target_tree->top_controls_delta_ = | 217 target_tree->top_controls_delta_ = |
215 target_tree->top_controls_delta_ - | 218 target_tree->top_controls_delta_ - |
216 target_tree->sent_top_controls_delta_; | 219 target_tree->sent_top_controls_delta_; |
217 target_tree->sent_top_controls_delta_ = 0.f; | 220 target_tree->sent_top_controls_delta_ = 0.f; |
218 | 221 |
219 target_tree->SetPageScaleValues( | 222 target_tree->SetPageScaleValues( |
220 page_scale_factor(), min_page_scale_factor(), max_page_scale_factor(), | 223 page_scale_factor(), min_page_scale_factor(), max_page_scale_factor(), |
221 target_tree->page_scale_delta() / target_tree->sent_page_scale_delta()); | 224 target_tree->page_scale_delta() / target_tree->sent_page_scale_delta()); |
222 target_tree->set_sent_page_scale_delta(1); | 225 target_tree->set_sent_page_scale_delta(1); |
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 page_scale, | 1518 page_scale, |
1516 duration.InSecondsF()); | 1519 duration.InSecondsF()); |
1517 } | 1520 } |
1518 } | 1521 } |
1519 | 1522 |
1520 scoped_ptr<PageScaleAnimation> LayerTreeImpl::TakePageScaleAnimation() { | 1523 scoped_ptr<PageScaleAnimation> LayerTreeImpl::TakePageScaleAnimation() { |
1521 return page_scale_animation_.Pass(); | 1524 return page_scale_animation_.Pass(); |
1522 } | 1525 } |
1523 | 1526 |
1524 } // namespace cc | 1527 } // namespace cc |
OLD | NEW |