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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1864183002: cc: Main thread skip single layers instead of subtrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format the comments 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') | cc/trees/property_tree.h » ('j') | 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 5525263d385696fbb63b68bc73b9100a0c80ee38..5c2b9c6477fc236b4955197600485444549e740e 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -106,14 +106,16 @@ void LayerTreeImpl::Shutdown() {
void LayerTreeImpl::ReleaseResources() {
if (root_layer_) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->ReleaseResources(); });
+ this, [](LayerImpl* layer) { layer->ReleaseResources(); },
+ CallFunctionLayerType::ALL_LAYERS);
}
}
void LayerTreeImpl::RecreateResources() {
if (root_layer_) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->RecreateResources(); });
+ this, [](LayerImpl* layer) { layer->RecreateResources(); },
+ CallFunctionLayerType::ALL_LAYERS);
}
}
@@ -126,9 +128,11 @@ void LayerTreeImpl::GatherFrameTimingRequestIds(
// that, we need to inform LayerTreeImpl whenever there are requests when we
// get them.
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [request_ids](LayerImpl* layer) {
+ this,
+ [request_ids](LayerImpl* layer) {
layer->GatherFrameTimingRequestIds(request_ids);
- });
+ },
+ CallFunctionLayerType::ALL_LAYERS);
}
bool LayerTreeImpl::IsViewportLayerId(int id) const {
@@ -564,9 +568,12 @@ void LayerTreeImpl::UpdatePropertyTreeScrollingAndAnimationFromMainThread() {
// frame to a newly-committed property tree.
if (!root_layer())
return;
- LayerTreeHostCommon::CallFunctionForEveryLayer(this, [](LayerImpl* layer) {
- layer->UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
- });
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
+ this,
+ [](LayerImpl* layer) {
+ layer->UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
+ },
+ CallFunctionLayerType::ALL_LAYERS);
}
void LayerTreeImpl::SetPageScaleOnActiveTree(float active_page_scale) {
@@ -1076,7 +1083,8 @@ void LayerTreeImpl::DidBecomeActive() {
if (root_layer()) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->DidBecomeActive(); });
+ this, [](LayerImpl* layer) { layer->DidBecomeActive(); },
+ CallFunctionLayerType::ALL_LAYERS);
}
for (const auto& swap_promise : swap_promise_list_)
« no previous file with comments | « cc/trees/layer_tree_host_unittest_serialization.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698