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 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 void LayerTreeHostImpl::OnDraw() { | 1500 void LayerTreeHostImpl::OnDraw() { |
1501 client_->OnDrawForOutputSurface(); | 1501 client_->OnDrawForOutputSurface(); |
1502 } | 1502 } |
1503 | 1503 |
1504 void LayerTreeHostImpl::OnCanDrawStateChangedForTree() { | 1504 void LayerTreeHostImpl::OnCanDrawStateChangedForTree() { |
1505 client_->OnCanDrawStateChanged(CanDraw()); | 1505 client_->OnCanDrawStateChanged(CanDraw()); |
1506 } | 1506 } |
1507 | 1507 |
1508 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { | 1508 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { |
1509 CompositorFrameMetadata metadata; | 1509 CompositorFrameMetadata metadata; |
1510 metadata.device_scale_factor = active_tree_->device_scale_factor(); | 1510 metadata.device_scale_factor = active_tree_->painted_device_scale_factor() * |
| 1511 active_tree_->device_scale_factor(); |
| 1512 |
1511 metadata.page_scale_factor = active_tree_->current_page_scale_factor(); | 1513 metadata.page_scale_factor = active_tree_->current_page_scale_factor(); |
1512 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize(); | 1514 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize(); |
1513 metadata.root_layer_size = active_tree_->ScrollableSize(); | 1515 metadata.root_layer_size = active_tree_->ScrollableSize(); |
1514 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); | 1516 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); |
1515 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); | 1517 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); |
1516 metadata.location_bar_offset = | 1518 metadata.location_bar_offset = |
1517 gfx::Vector2dF(0.f, top_controls_manager_->ControlsTopOffset()); | 1519 gfx::Vector2dF(0.f, top_controls_manager_->ControlsTopOffset()); |
1518 metadata.location_bar_content_translation = | 1520 metadata.location_bar_content_translation = |
1519 gfx::Vector2dF(0.f, top_controls_manager_->ContentTopOffset()); | 1521 gfx::Vector2dF(0.f, top_controls_manager_->ContentTopOffset()); |
1520 metadata.root_background_color = active_tree_->background_color(); | 1522 metadata.root_background_color = active_tree_->background_color(); |
(...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3638 if (active_tree()) { | 3640 if (active_tree()) { |
3639 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); | 3641 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); |
3640 if (layer) | 3642 if (layer) |
3641 return layer->ScrollOffsetForAnimation(); | 3643 return layer->ScrollOffsetForAnimation(); |
3642 } | 3644 } |
3643 | 3645 |
3644 return gfx::ScrollOffset(); | 3646 return gfx::ScrollOffset(); |
3645 } | 3647 } |
3646 | 3648 |
3647 } // namespace cc | 3649 } // namespace cc |
OLD | NEW |