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

Unified Diff: cc/debug/debug_rect_history.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 | « no previous file | cc/debug/invalidation_benchmark.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/debug_rect_history.cc
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc
index cde7765383f33ba59dccd77278663f9257d3976e..22a612ce0e4c7f013c9d6df163161f73217c957e 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -163,10 +163,9 @@ void DebugRectHistory::SaveScreenSpaceRects(
}
void DebugRectHistory::SaveTouchEventHandlerRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree<LayerImpl>(
- layer,
- base::Bind(&DebugRectHistory::SaveTouchEventHandlerRectsCallback,
- base::Unretained(this)));
+ LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
+ SaveTouchEventHandlerRectsCallback(layer);
+ });
}
void DebugRectHistory::SaveTouchEventHandlerRectsCallback(LayerImpl* layer) {
@@ -183,10 +182,9 @@ void DebugRectHistory::SaveTouchEventHandlerRectsCallback(LayerImpl* layer) {
}
void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree<LayerImpl>(
- layer,
- base::Bind(&DebugRectHistory::SaveWheelEventHandlerRectsCallback,
- base::Unretained(this)));
+ LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
+ SaveWheelEventHandlerRectsCallback(layer);
+ });
}
void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) {
@@ -204,10 +202,9 @@ void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) {
}
void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree<LayerImpl>(
- layer,
- base::Bind(&DebugRectHistory::SaveScrollEventHandlerRectsCallback,
- base::Unretained(this)));
+ LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
+ SaveScrollEventHandlerRectsCallback(layer);
+ });
}
void DebugRectHistory::SaveScrollEventHandlerRectsCallback(LayerImpl* layer) {
@@ -225,10 +222,9 @@ void DebugRectHistory::SaveScrollEventHandlerRectsCallback(LayerImpl* layer) {
}
void DebugRectHistory::SaveNonFastScrollableRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree<LayerImpl>(
- layer,
- base::Bind(&DebugRectHistory::SaveNonFastScrollableRectsCallback,
- base::Unretained(this)));
+ LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
+ SaveNonFastScrollableRectsCallback(layer);
+ });
}
void DebugRectHistory::SaveNonFastScrollableRectsCallback(LayerImpl* layer) {
« no previous file with comments | « no previous file | cc/debug/invalidation_benchmark.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698