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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1846043002: cc : Make CallFunctionForSubtree on impl use layer iterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 21e71ae049ffb0ade90d37e414b52c4d02d20c76..22a3e92cae0f2e07bda68d532f1f3a56ac5fc47f 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -105,14 +105,14 @@ void LayerTreeImpl::Shutdown() {
void LayerTreeImpl::ReleaseResources() {
if (root_layer_) {
- LayerTreeHostCommon::CallFunctionForSubtree(
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
root_layer_, [](LayerImpl* layer) { layer->ReleaseResources(); });
}
}
void LayerTreeImpl::RecreateResources() {
if (root_layer_) {
- LayerTreeHostCommon::CallFunctionForSubtree(
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
root_layer_, [](LayerImpl* layer) { layer->RecreateResources(); });
}
}
@@ -125,7 +125,7 @@ void LayerTreeImpl::GatherFrameTimingRequestIds(
// TODO(vmpstr): Early out if there are no requests on any of the layers. For
// that, we need to inform LayerTreeImpl whenever there are requests when we
// get them.
- LayerTreeHostCommon::CallFunctionForSubtree(
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
root_layer_, [request_ids](LayerImpl* layer) {
layer->GatherFrameTimingRequestIds(request_ids);
});
@@ -564,7 +564,7 @@ void LayerTreeImpl::UpdatePropertyTreeScrollingAndAnimationFromMainThread() {
// frame to a newly-committed property tree.
if (!root_layer())
return;
- LayerTreeHostCommon::CallFunctionForSubtree(
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
root_layer(), [](LayerImpl* layer) {
layer->UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
});
@@ -853,7 +853,7 @@ bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) {
occlusion_tracker.set_minimum_tracking_size(
settings().minimum_occlusion_tracking_size);
- // LayerIterator is used here instead of CallFunctionForSubtree to only
+ // LayerIterator is used here instead of CallFunctionForEveryLayer to only
// UpdateTilePriorities on layers that will be visible (and thus have valid
// draw properties) and not because any ordering is required.
LayerIterator end = LayerIterator::End(&render_surface_layer_list_);
@@ -1077,7 +1077,7 @@ void LayerTreeImpl::DidBecomeActive() {
layer_tree_host_impl_->ResetRequiresHighResToDraw();
if (root_layer()) {
- LayerTreeHostCommon::CallFunctionForSubtree(
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
root_layer(), [](LayerImpl* layer) { layer->DidBecomeActive(); });
}
« cc/trees/layer_tree_host_common.h ('K') | « 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