| 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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 !OuterViewportScrollLayer()->user_scrollable_horizontal(); | 1624 !OuterViewportScrollLayer()->user_scrollable_horizontal(); |
| 1625 metadata.root_overflow_y_hidden = | 1625 metadata.root_overflow_y_hidden = |
| 1626 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1626 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
| 1627 } | 1627 } |
| 1628 | 1628 |
| 1629 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { | 1629 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { |
| 1630 metadata.is_resourceless_software_draw_with_scroll_or_animation = | 1630 metadata.is_resourceless_software_draw_with_scroll_or_animation = |
| 1631 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); | 1631 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { | 1634 for (auto& surface_id : active_tree_->SurfaceLayerIds()) { |
| 1635 SurfaceLayerImpl* surface_layer_impl = | 1635 metadata.referenced_surfaces.push_back(surface_id); |
| 1636 static_cast<SurfaceLayerImpl*>(surface_layer); | |
| 1637 if (settings_.enable_surface_synchronization) { | |
| 1638 if (surface_layer_impl->fallback_surface_info().is_valid()) { | |
| 1639 metadata.referenced_surfaces.push_back( | |
| 1640 surface_layer_impl->fallback_surface_info().id()); | |
| 1641 } | |
| 1642 } else { | |
| 1643 metadata.referenced_surfaces.push_back( | |
| 1644 surface_layer_impl->primary_surface_info().id()); | |
| 1645 } | |
| 1646 } | 1636 } |
| 1637 |
| 1647 if (!InnerViewportScrollLayer()) | 1638 if (!InnerViewportScrollLayer()) |
| 1648 return metadata; | 1639 return metadata; |
| 1649 | 1640 |
| 1650 metadata.root_overflow_x_hidden |= | 1641 metadata.root_overflow_x_hidden |= |
| 1651 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1642 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
| 1652 metadata.root_overflow_y_hidden |= | 1643 metadata.root_overflow_y_hidden |= |
| 1653 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1644 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
| 1654 | 1645 |
| 1655 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1646 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
| 1656 metadata.root_scroll_offset = | 1647 metadata.root_scroll_offset = |
| (...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4356 | 4347 |
| 4357 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4348 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4358 if (!element_id) | 4349 if (!element_id) |
| 4359 return; | 4350 return; |
| 4360 if (ScrollbarAnimationController* animation_controller = | 4351 if (ScrollbarAnimationController* animation_controller = |
| 4361 ScrollbarAnimationControllerForElementId(element_id)) | 4352 ScrollbarAnimationControllerForElementId(element_id)) |
| 4362 animation_controller->DidScrollUpdate(); | 4353 animation_controller->DidScrollUpdate(); |
| 4363 } | 4354 } |
| 4364 | 4355 |
| 4365 } // namespace cc | 4356 } // namespace cc |
| OLD | NEW |