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

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

Issue 2720503008: Add cc::SurfaceInfo::is_valid() (Closed)
Patch Set: Added Log() Created 3 years, 9 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/surfaces/surface_info.h ('k') | services/ui/ws/frame_generator.cc » ('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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations(); 1595 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations();
1596 } 1596 }
1597 1597
1598 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { 1598 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) {
1599 SurfaceLayerImpl* surface_layer_impl = 1599 SurfaceLayerImpl* surface_layer_impl =
1600 static_cast<SurfaceLayerImpl*>(surface_layer); 1600 static_cast<SurfaceLayerImpl*>(surface_layer);
1601 metadata.referenced_surfaces.push_back( 1601 metadata.referenced_surfaces.push_back(
1602 surface_layer_impl->primary_surface_info().id()); 1602 surface_layer_impl->primary_surface_info().id());
1603 // We need to retain a reference to the fallback surface too so that it's 1603 // We need to retain a reference to the fallback surface too so that it's
1604 // guaranteed to be available when needed. 1604 // guaranteed to be available when needed.
1605 if (surface_layer_impl->fallback_surface_info().id().is_valid()) { 1605 if (surface_layer_impl->fallback_surface_info().is_valid()) {
1606 metadata.referenced_surfaces.push_back( 1606 metadata.referenced_surfaces.push_back(
1607 surface_layer_impl->fallback_surface_info().id()); 1607 surface_layer_impl->fallback_surface_info().id());
1608 } 1608 }
1609 } 1609 }
1610 if (!InnerViewportScrollLayer()) 1610 if (!InnerViewportScrollLayer())
1611 return metadata; 1611 return metadata;
1612 1612
1613 metadata.root_overflow_x_hidden |= 1613 metadata.root_overflow_x_hidden |=
1614 !InnerViewportScrollLayer()->user_scrollable_horizontal(); 1614 !InnerViewportScrollLayer()->user_scrollable_horizontal();
1615 metadata.root_overflow_y_hidden |= 1615 metadata.root_overflow_y_hidden |=
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
4154 worker_context_visibility_ = 4154 worker_context_visibility_ =
4155 worker_context->CacheController()->ClientBecameVisible(); 4155 worker_context->CacheController()->ClientBecameVisible();
4156 } else { 4156 } else {
4157 worker_context->CacheController()->ClientBecameNotVisible( 4157 worker_context->CacheController()->ClientBecameNotVisible(
4158 std::move(worker_context_visibility_)); 4158 std::move(worker_context_visibility_));
4159 } 4159 }
4160 } 4160 }
4161 } 4161 }
4162 4162
4163 } // namespace cc 4163 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_info.h ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698