Chromium Code Reviews| 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 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { | 1619 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { |
| 1620 metadata.is_resourceless_software_draw_with_scroll_or_animation = | 1620 metadata.is_resourceless_software_draw_with_scroll_or_animation = |
| 1621 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); | 1621 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { | 1624 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { |
| 1625 SurfaceLayerImpl* surface_layer_impl = | 1625 SurfaceLayerImpl* surface_layer_impl = |
| 1626 static_cast<SurfaceLayerImpl*>(surface_layer); | 1626 static_cast<SurfaceLayerImpl*>(surface_layer); |
| 1627 metadata.referenced_surfaces.push_back( | 1627 if (!settings_.enable_surface_synchronization) { |
|
vmpstr
2017/04/11 18:35:17
nit: can you flip this to the positive and exchang
Fady Samuel
2017/04/11 19:39:24
Done.
| |
| 1628 surface_layer_impl->primary_surface_info().id()); | |
| 1629 // We need to retain a reference to the fallback surface too so that it's | |
| 1630 // guaranteed to be available when needed. | |
| 1631 if (surface_layer_impl->fallback_surface_info().is_valid()) { | |
| 1632 metadata.referenced_surfaces.push_back( | 1628 metadata.referenced_surfaces.push_back( |
| 1633 surface_layer_impl->fallback_surface_info().id()); | 1629 surface_layer_impl->primary_surface_info().id()); |
| 1630 } else { | |
| 1631 if (surface_layer_impl->fallback_surface_info().is_valid()) { | |
| 1632 metadata.referenced_surfaces.push_back( | |
| 1633 surface_layer_impl->fallback_surface_info().id()); | |
|
vmpstr
2017/04/11 18:35:17
hmm why do we not reference primary surface info i
Fady Samuel
2017/04/11 19:39:24
As the description says, fallbacks are references
| |
| 1634 } | |
| 1634 } | 1635 } |
| 1635 } | 1636 } |
| 1636 if (!InnerViewportScrollLayer()) | 1637 if (!InnerViewportScrollLayer()) |
| 1637 return metadata; | 1638 return metadata; |
| 1638 | 1639 |
| 1639 metadata.root_overflow_x_hidden |= | 1640 metadata.root_overflow_x_hidden |= |
| 1640 !InnerViewportScrollLayer()->user_scrollable_horizontal(); | 1641 !InnerViewportScrollLayer()->user_scrollable_horizontal(); |
| 1641 metadata.root_overflow_y_hidden |= | 1642 metadata.root_overflow_y_hidden |= |
| 1642 !InnerViewportScrollLayer()->user_scrollable_vertical(); | 1643 !InnerViewportScrollLayer()->user_scrollable_vertical(); |
| 1643 | 1644 |
| (...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4297 } | 4298 } |
| 4298 | 4299 |
| 4299 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { | 4300 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { |
| 4300 if (is_wheel_scroll) | 4301 if (is_wheel_scroll) |
| 4301 has_scrolled_by_wheel_ = true; | 4302 has_scrolled_by_wheel_ = true; |
| 4302 else | 4303 else |
| 4303 has_scrolled_by_touch_ = true; | 4304 has_scrolled_by_touch_ = true; |
| 4304 } | 4305 } |
| 4305 | 4306 |
| 4306 } // namespace cc | 4307 } // namespace cc |
| OLD | NEW |