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

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

Issue 2720503008: Add cc::SurfaceInfo::is_valid() (Closed)
Patch Set: Check is_valid() during deserialization 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
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 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after
4140 worker_context_visibility_ = 4140 worker_context_visibility_ =
4141 worker_context->CacheController()->ClientBecameVisible(); 4141 worker_context->CacheController()->ClientBecameVisible();
4142 } else { 4142 } else {
4143 worker_context->CacheController()->ClientBecameNotVisible( 4143 worker_context->CacheController()->ClientBecameNotVisible(
4144 std::move(worker_context_visibility_)); 4144 std::move(worker_context_visibility_));
4145 } 4145 }
4146 } 4146 }
4147 } 4147 }
4148 4148
4149 } // namespace cc 4149 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698