| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1600 } | 1600 } |
| 1601 | 1601 |
| 1602 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { | 1602 CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { |
| 1603 CompositorFrameMetadata metadata; | 1603 CompositorFrameMetadata metadata; |
| 1604 metadata.device_scale_factor = active_tree_->painted_device_scale_factor() * | 1604 metadata.device_scale_factor = active_tree_->painted_device_scale_factor() * |
| 1605 active_tree_->device_scale_factor(); | 1605 active_tree_->device_scale_factor(); |
| 1606 | 1606 |
| 1607 metadata.page_scale_factor = active_tree_->current_page_scale_factor(); | 1607 metadata.page_scale_factor = active_tree_->current_page_scale_factor(); |
| 1608 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize(); | 1608 metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize(); |
| 1609 metadata.root_layer_size = active_tree_->ScrollableSize(); | 1609 metadata.root_layer_size = active_tree_->ScrollableSize(); |
| 1610 metadata.device_viewport_size = active_tree_->device_viewport_size(); |
| 1610 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); | 1611 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); |
| 1611 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); | 1612 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); |
| 1612 metadata.top_controls_height = | 1613 metadata.top_controls_height = |
| 1613 browser_controls_offset_manager_->TopControlsHeight(); | 1614 browser_controls_offset_manager_->TopControlsHeight(); |
| 1614 metadata.top_controls_shown_ratio = | 1615 metadata.top_controls_shown_ratio = |
| 1615 browser_controls_offset_manager_->TopControlsShownRatio(); | 1616 browser_controls_offset_manager_->TopControlsShownRatio(); |
| 1616 metadata.bottom_controls_height = | 1617 metadata.bottom_controls_height = |
| 1617 browser_controls_offset_manager_->BottomControlsHeight(); | 1618 browser_controls_offset_manager_->BottomControlsHeight(); |
| 1618 metadata.bottom_controls_shown_ratio = | 1619 metadata.bottom_controls_shown_ratio = |
| 1619 browser_controls_offset_manager_->BottomControlsShownRatio(); | 1620 browser_controls_offset_manager_->BottomControlsShownRatio(); |
| 1620 metadata.root_background_color = active_tree_->background_color(); | 1621 metadata.root_background_color = active_tree_->background_color(); |
| 1622 metadata.is_fullscreen = active_tree_->is_fullscreen(); |
| 1621 metadata.content_source_id = active_tree_->content_source_id(); | 1623 metadata.content_source_id = active_tree_->content_source_id(); |
| 1622 | 1624 |
| 1623 active_tree_->GetViewportSelection(&metadata.selection); | 1625 active_tree_->GetViewportSelection(&metadata.selection); |
| 1624 | 1626 |
| 1625 if (OuterViewportScrollLayer()) { | 1627 if (OuterViewportScrollLayer()) { |
| 1626 metadata.root_overflow_x_hidden = | 1628 metadata.root_overflow_x_hidden = |
| 1627 !OuterViewportScrollLayer()->user_scrollable_horizontal(); | 1629 !OuterViewportScrollLayer()->user_scrollable_horizontal(); |
| 1628 metadata.root_overflow_y_hidden = | 1630 metadata.root_overflow_y_hidden = |
| 1629 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1631 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
| 1630 } | 1632 } |
| (...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4365 | 4367 |
| 4366 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4368 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4367 if (!element_id) | 4369 if (!element_id) |
| 4368 return; | 4370 return; |
| 4369 if (ScrollbarAnimationController* animation_controller = | 4371 if (ScrollbarAnimationController* animation_controller = |
| 4370 ScrollbarAnimationControllerForElementId(element_id)) | 4372 ScrollbarAnimationControllerForElementId(element_id)) |
| 4371 animation_controller->DidScrollUpdate(); | 4373 animation_controller->DidScrollUpdate(); |
| 4372 } | 4374 } |
| 4373 | 4375 |
| 4374 } // namespace cc | 4376 } // namespace cc |
| OLD | NEW |