| 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 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { | 1368 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { |
| 1369 CompositorFrameMetadata metadata; | 1369 CompositorFrameMetadata metadata; |
| 1370 metadata.device_scale_factor = device_scale_factor_; | 1370 metadata.device_scale_factor = device_scale_factor_; |
| 1371 metadata.page_scale_factor = active_tree_->total_page_scale_factor(); | 1371 metadata.page_scale_factor = active_tree_->total_page_scale_factor(); |
| 1372 metadata.viewport_size = active_tree_->ScrollableViewportSize(); | 1372 metadata.viewport_size = active_tree_->ScrollableViewportSize(); |
| 1373 metadata.root_layer_size = active_tree_->ScrollableSize(); | 1373 metadata.root_layer_size = active_tree_->ScrollableSize(); |
| 1374 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); | 1374 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); |
| 1375 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); | 1375 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); |
| 1376 metadata.source_frame_number = active_tree_->source_frame_number(); |
| 1376 if (top_controls_manager_) { | 1377 if (top_controls_manager_) { |
| 1377 metadata.location_bar_offset = | 1378 metadata.location_bar_offset = |
| 1378 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); | 1379 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); |
| 1379 metadata.location_bar_content_translation = | 1380 metadata.location_bar_content_translation = |
| 1380 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); | 1381 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); |
| 1381 metadata.overdraw_bottom_height = overdraw_bottom_height_; | 1382 metadata.overdraw_bottom_height = overdraw_bottom_height_; |
| 1382 } | 1383 } |
| 1383 | 1384 |
| 1384 if (!InnerViewportScrollLayer()) | 1385 if (!InnerViewportScrollLayer()) |
| 1385 return metadata; | 1386 return metadata; |
| (...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3123 swap_promise_monitor_.erase(monitor); | 3124 swap_promise_monitor_.erase(monitor); |
| 3124 } | 3125 } |
| 3125 | 3126 |
| 3126 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3127 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 3127 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3128 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 3128 for (; it != swap_promise_monitor_.end(); it++) | 3129 for (; it != swap_promise_monitor_.end(); it++) |
| 3129 (*it)->OnSetNeedsRedrawOnImpl(); | 3130 (*it)->OnSetNeedsRedrawOnImpl(); |
| 3130 } | 3131 } |
| 3131 | 3132 |
| 3132 } // namespace cc | 3133 } // namespace cc |
| OLD | NEW |