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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 } | 1356 } |
1357 | 1357 |
1358 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { | 1358 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { |
1359 CompositorFrameMetadata metadata; | 1359 CompositorFrameMetadata metadata; |
1360 metadata.device_scale_factor = device_scale_factor_; | 1360 metadata.device_scale_factor = device_scale_factor_; |
1361 metadata.page_scale_factor = active_tree_->total_page_scale_factor(); | 1361 metadata.page_scale_factor = active_tree_->total_page_scale_factor(); |
1362 metadata.viewport_size = active_tree_->ScrollableViewportSize(); | 1362 metadata.viewport_size = active_tree_->ScrollableViewportSize(); |
1363 metadata.root_layer_size = active_tree_->ScrollableSize(); | 1363 metadata.root_layer_size = active_tree_->ScrollableSize(); |
1364 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); | 1364 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); |
1365 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); | 1365 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); |
| 1366 metadata.source_frame_number = active_tree_->source_frame_number(); |
1366 if (top_controls_manager_) { | 1367 if (top_controls_manager_) { |
1367 metadata.location_bar_offset = | 1368 metadata.location_bar_offset = |
1368 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); | 1369 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); |
1369 metadata.location_bar_content_translation = | 1370 metadata.location_bar_content_translation = |
1370 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); | 1371 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); |
1371 metadata.overdraw_bottom_height = overdraw_bottom_height_; | 1372 metadata.overdraw_bottom_height = overdraw_bottom_height_; |
1372 } | 1373 } |
1373 | 1374 |
1374 if (!InnerViewportScrollLayer()) | 1375 if (!InnerViewportScrollLayer()) |
1375 return metadata; | 1376 return metadata; |
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3117 swap_promise_monitor_.erase(monitor); | 3118 swap_promise_monitor_.erase(monitor); |
3118 } | 3119 } |
3119 | 3120 |
3120 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3121 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
3121 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3122 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
3122 for (; it != swap_promise_monitor_.end(); it++) | 3123 for (; it != swap_promise_monitor_.end(); it++) |
3123 (*it)->OnSetNeedsRedrawOnImpl(); | 3124 (*it)->OnSetNeedsRedrawOnImpl(); |
3124 } | 3125 } |
3125 | 3126 |
3126 } // namespace cc | 3127 } // namespace cc |
OLD | NEW |