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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1907053004: cc: Make CallFunctionForEveryLayer use LayerListIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FindLayers should skip layers instead of returning when switching from call-function to iteration l… Created 4 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_unittest_serialization.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 98171259c65ddca80d1e97a01a040ba0e85b4852..06b34d3ecc154755d2a71cd9aeb65533a2cc5318 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -106,16 +106,14 @@ void LayerTreeImpl::Shutdown() {
void LayerTreeImpl::ReleaseResources() {
if (root_layer_) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->ReleaseResources(); },
- CallFunctionLayerType::ALL_LAYERS);
+ this, [](LayerImpl* layer) { layer->ReleaseResources(); });
}
}
void LayerTreeImpl::RecreateResources() {
if (root_layer_) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->RecreateResources(); },
- CallFunctionLayerType::ALL_LAYERS);
+ this, [](LayerImpl* layer) { layer->RecreateResources(); });
}
}
@@ -555,12 +553,9 @@ void LayerTreeImpl::UpdatePropertyTreeScrollingAndAnimationFromMainThread() {
// frame to a newly-committed property tree.
if (!root_layer())
return;
- LayerTreeHostCommon::CallFunctionForEveryLayer(
- this,
- [](LayerImpl* layer) {
- layer->UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
- },
- CallFunctionLayerType::ALL_LAYERS);
+ LayerTreeHostCommon::CallFunctionForEveryLayer(this, [](LayerImpl* layer) {
+ layer->UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
+ });
}
void LayerTreeImpl::SetPageScaleOnActiveTree(float active_page_scale) {
@@ -1073,8 +1068,7 @@ void LayerTreeImpl::DidBecomeActive() {
if (root_layer()) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->DidBecomeActive(); },
- CallFunctionLayerType::ALL_LAYERS);
+ this, [](LayerImpl* layer) { layer->DidBecomeActive(); });
}
for (const auto& swap_promise : swap_promise_list_)
« no previous file with comments | « cc/trees/layer_tree_host_unittest_serialization.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698