Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2811813004: Surface Synchronization: Distinguish between dependencies and references (Closed)
Patch Set: Addressed Vlad's comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) {
1628 surface_layer_impl->primary_surface_info().id()); 1628 if (surface_layer_impl->fallback_surface_info().is_valid()) {
1629 // We need to retain a reference to the fallback surface too so that it's 1629 metadata.referenced_surfaces.push_back(
1630 // guaranteed to be available when needed. 1630 surface_layer_impl->fallback_surface_info().id());
1631 if (surface_layer_impl->fallback_surface_info().is_valid()) { 1631 }
piman 2017/04/12 00:09:34 Should we add a reference to the primary when we d
Fady Samuel 2017/04/12 00:19:44 Currently we have both primary and fallback Surfac
1632 } else {
1632 metadata.referenced_surfaces.push_back( 1633 metadata.referenced_surfaces.push_back(
1633 surface_layer_impl->fallback_surface_info().id()); 1634 surface_layer_impl->primary_surface_info().id());
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698