| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/debug/debug_rect_history.h" | 5 #include "cc/debug/debug_rect_history.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 gfx::Rect(layer->bounds())))); | 190 gfx::Rect(layer->bounds())))); |
| 191 } | 191 } |
| 192 | 192 |
| 193 void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) { | 193 void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) { |
| 194 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { | 194 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { |
| 195 SaveScrollEventHandlerRectsCallback(layer); | 195 SaveScrollEventHandlerRectsCallback(layer); |
| 196 }); | 196 }); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void DebugRectHistory::SaveScrollEventHandlerRectsCallback(LayerImpl* layer) { | 199 void DebugRectHistory::SaveScrollEventHandlerRectsCallback(LayerImpl* layer) { |
| 200 if (!layer->have_scroll_event_handlers()) | 200 if (!layer->layer_tree_impl()->have_scroll_event_handlers()) |
| 201 return; | 201 return; |
| 202 | 202 |
| 203 debug_rects_.push_back( | 203 debug_rects_.push_back( |
| 204 DebugRect(SCROLL_EVENT_HANDLER_RECT_TYPE, | 204 DebugRect(SCROLL_EVENT_HANDLER_RECT_TYPE, |
| 205 MathUtil::MapEnclosingClippedRect(layer->ScreenSpaceTransform(), | 205 MathUtil::MapEnclosingClippedRect(layer->ScreenSpaceTransform(), |
| 206 gfx::Rect(layer->bounds())))); | 206 gfx::Rect(layer->bounds())))); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void DebugRectHistory::SaveNonFastScrollableRects(LayerImpl* layer) { | 209 void DebugRectHistory::SaveNonFastScrollableRects(LayerImpl* layer) { |
| 210 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { | 210 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 240 debug_rects_.push_back( | 240 debug_rects_.push_back( |
| 241 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, | 241 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, |
| 242 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), | 242 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), |
| 243 inflated_bounds.y(), | 243 inflated_bounds.y(), |
| 244 inflated_bounds.width(), | 244 inflated_bounds.width(), |
| 245 inflated_bounds.height())))); | 245 inflated_bounds.height())))); |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace cc | 249 } // namespace cc |
| OLD | NEW |