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

Unified Diff: cc/debug/debug_rect_history.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
« no previous file with comments | « cc/debug/debug_rect_history.h ('k') | cc/debug/invalidation_benchmark.cc » ('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 cc8d12363b1d339afe60882cfe9ca96e20768429..1659316f4d74a73c019318f254858540921a7a32 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -39,16 +39,16 @@ void DebugRectHistory::SaveDebugRectsForCurrentFrame(
debug_rects_.clear();
if (debug_state.show_touch_event_handler_rects)
- SaveTouchEventHandlerRects(root_layer);
+ SaveTouchEventHandlerRects(root_layer->layer_tree_impl());
if (debug_state.show_wheel_event_handler_rects)
SaveWheelEventHandlerRects(root_layer);
if (debug_state.show_scroll_event_handler_rects)
- SaveScrollEventHandlerRects(root_layer);
+ SaveScrollEventHandlerRects(root_layer->layer_tree_impl());
if (debug_state.show_non_fast_scrollable_rects)
- SaveNonFastScrollableRects(root_layer);
+ SaveNonFastScrollableRects(root_layer->layer_tree_impl());
if (debug_state.show_paint_rects)
SavePaintRects(root_layer);
@@ -157,10 +157,10 @@ void DebugRectHistory::SaveScreenSpaceRects(
}
}
-void DebugRectHistory::SaveTouchEventHandlerRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
- SaveTouchEventHandlerRectsCallback(layer);
- });
+void DebugRectHistory::SaveTouchEventHandlerRects(LayerTreeImpl* tree_impl) {
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
+ tree_impl,
+ [this](LayerImpl* layer) { SaveTouchEventHandlerRectsCallback(layer); });
}
void DebugRectHistory::SaveTouchEventHandlerRectsCallback(LayerImpl* layer) {
@@ -196,10 +196,10 @@ void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) {
gfx::Rect(inner_viewport->bounds()))));
}
-void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
- SaveScrollEventHandlerRectsCallback(layer);
- });
+void DebugRectHistory::SaveScrollEventHandlerRects(LayerTreeImpl* tree_impl) {
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
+ tree_impl,
+ [this](LayerImpl* layer) { SaveScrollEventHandlerRectsCallback(layer); });
}
void DebugRectHistory::SaveScrollEventHandlerRectsCallback(LayerImpl* layer) {
@@ -212,10 +212,10 @@ void DebugRectHistory::SaveScrollEventHandlerRectsCallback(LayerImpl* layer) {
gfx::Rect(layer->bounds()))));
}
-void DebugRectHistory::SaveNonFastScrollableRects(LayerImpl* layer) {
- LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
- SaveNonFastScrollableRectsCallback(layer);
- });
+void DebugRectHistory::SaveNonFastScrollableRects(LayerTreeImpl* tree_impl) {
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
+ tree_impl,
+ [this](LayerImpl* layer) { SaveNonFastScrollableRectsCallback(layer); });
}
void DebugRectHistory::SaveNonFastScrollableRectsCallback(LayerImpl* layer) {
« no previous file with comments | « cc/debug/debug_rect_history.h ('k') | cc/debug/invalidation_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698