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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 937883002: cc: Change CallFunctionForSubtree to use lambdas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: actual rebase Created 5 years, 10 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/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index abc63fc932eebfd8297d1bd0e020e9c3040b72a1..92e9c2593fc2a2c8a23eb897d85f37a08b143c33 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -211,10 +211,6 @@ void LayerTreeHost::SetLayerTreeHostClientReady() {
proxy_->SetLayerTreeHostClientReady();
}
-static void LayerTreeHostOnOutputSurfaceCreatedCallback(Layer* layer) {
- layer->OnOutputSurfaceCreated();
-}
-
void LayerTreeHost::DeleteContentsTexturesOnImplThread(
ResourceProvider* resource_provider) {
DCHECK(proxy_->IsImplThread());
@@ -427,7 +423,7 @@ void LayerTreeHost::DidInitializeOutputSurface() {
if (root_layer()) {
LayerTreeHostCommon::CallFunctionForSubtree(
- root_layer(), base::Bind(&LayerTreeHostOnOutputSurfaceCreatedCallback));
+ root_layer(), [](Layer* layer) { layer->OnOutputSurfaceCreated(); });
}
client_->DidInitializeOutputSurface();
@@ -873,17 +869,12 @@ void LayerTreeHost::TriggerPrepaint() {
SetNeedsCommit();
}
-static void LayerTreeHostReduceMemoryCallback(Layer* layer) {
- layer->ReduceMemoryUsage();
-}
-
void LayerTreeHost::ReduceMemoryUsage() {
if (!root_layer())
return;
LayerTreeHostCommon::CallFunctionForSubtree(
- root_layer(),
- base::Bind(&LayerTreeHostReduceMemoryCallback));
+ root_layer(), [](Layer* layer) { layer->ReduceMemoryUsage(); });
}
void LayerTreeHost::SetPrioritiesForSurfaces(size_t surface_memory_bytes) {
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698