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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 62654865f4d51e641bd820b3652b2b945f2c1adc..344eb45d30a9fc8c238c528fb221c88687111196 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1624,13 +1624,14 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) {
SurfaceLayerImpl* surface_layer_impl =
static_cast<SurfaceLayerImpl*>(surface_layer);
- metadata.referenced_surfaces.push_back(
- surface_layer_impl->primary_surface_info().id());
- // We need to retain a reference to the fallback surface too so that it's
- // guaranteed to be available when needed.
- if (surface_layer_impl->fallback_surface_info().is_valid()) {
+ if (settings_.enable_surface_synchronization) {
+ if (surface_layer_impl->fallback_surface_info().is_valid()) {
+ metadata.referenced_surfaces.push_back(
+ surface_layer_impl->fallback_surface_info().id());
+ }
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
+ } else {
metadata.referenced_surfaces.push_back(
- surface_layer_impl->fallback_surface_info().id());
+ surface_layer_impl->primary_surface_info().id());
}
}
if (!InnerViewportScrollLayer())
« 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