| 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 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 metadata.root_overflow_y_hidden = | 1563 metadata.root_overflow_y_hidden = |
| 1564 !OuterViewportScrollLayer()->user_scrollable_vertical(); | 1564 !OuterViewportScrollLayer()->user_scrollable_vertical(); |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { | 1567 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { |
| 1568 metadata.is_resourceless_software_draw_with_scroll_or_animation = | 1568 metadata.is_resourceless_software_draw_with_scroll_or_animation = |
| 1569 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); | 1569 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { | 1572 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { |
| 1573 SurfaceLayerImpl* surface_layer_impl = |
| 1574 static_cast<SurfaceLayerImpl*>(surface_layer); |
| 1573 metadata.referenced_surfaces.push_back( | 1575 metadata.referenced_surfaces.push_back( |
| 1574 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_info().id()); | 1576 surface_layer_impl->primary_surface_info().id()); |
| 1577 if (surface_layer_impl->fallback_surface_info().id().is_valid()) { |
| 1578 metadata.referenced_surfaces.push_back( |
| 1579 surface_layer_impl->fallback_surface_info().id()); |
| 1580 } |
| 1575 } | 1581 } |
| 1576 if (!InnerViewportScrollLayer()) | 1582 if (!InnerViewportScrollLayer()) |
| 1577 return metadata; | 1583 return metadata; |
| 1578 | 1584 |
| 1579 metadata.root_overflow_x_hidden |= | 1585 metadata.root_overflow_x_hidden |= |
| 1580 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1586 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
| 1581 metadata.root_overflow_y_hidden |= | 1587 metadata.root_overflow_y_hidden |= |
| 1582 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1588 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
| 1583 | 1589 |
| 1584 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1590 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
| (...skipping 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4090 worker_context_visibility_ = | 4096 worker_context_visibility_ = |
| 4091 worker_context->CacheController()->ClientBecameVisible(); | 4097 worker_context->CacheController()->ClientBecameVisible(); |
| 4092 } else { | 4098 } else { |
| 4093 worker_context->CacheController()->ClientBecameNotVisible( | 4099 worker_context->CacheController()->ClientBecameNotVisible( |
| 4094 std::move(worker_context_visibility_)); | 4100 std::move(worker_context_visibility_)); |
| 4095 } | 4101 } |
| 4096 } | 4102 } |
| 4097 } | 4103 } |
| 4098 | 4104 |
| 4099 } // namespace cc | 4105 } // namespace cc |
| OLD | NEW |