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