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 "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 MathUtil::MapEnclosingClippedRect( | 172 MathUtil::MapEnclosingClippedRect( |
173 layer->ScreenSpaceTransform(), iter.rect()))); | 173 layer->ScreenSpaceTransform(), iter.rect()))); |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) { | 177 void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) { |
178 EventListenerProperties event_properties = | 178 EventListenerProperties event_properties = |
179 root_layer->layer_tree_impl()->event_listener_properties( | 179 root_layer->layer_tree_impl()->event_listener_properties( |
180 EventListenerClass::kMouseWheel); | 180 EventListenerClass::kMouseWheel); |
181 if (event_properties == EventListenerProperties::kNone || | 181 if (event_properties == EventListenerProperties::kNone || |
182 (root_layer->layer_tree_impl()->settings().use_mouse_wheel_gestures && | 182 event_properties == EventListenerProperties::kPassive) { |
183 event_properties == EventListenerProperties::kPassive)) { | |
184 return; | 183 return; |
185 } | 184 } |
186 | 185 |
187 // Since the wheel event handlers property is on the entire layer tree just | 186 // Since the wheel event handlers property is on the entire layer tree just |
188 // mark inner viewport if have listeners. | 187 // mark inner viewport if have listeners. |
189 LayerImpl* inner_viewport = | 188 LayerImpl* inner_viewport = |
190 root_layer->layer_tree_impl()->InnerViewportScrollLayer(); | 189 root_layer->layer_tree_impl()->InnerViewportScrollLayer(); |
191 if (!inner_viewport) | 190 if (!inner_viewport) |
192 return; | 191 return; |
193 debug_rects_.push_back(DebugRect( | 192 debug_rects_.push_back(DebugRect( |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 debug_rects_.push_back( | 245 debug_rects_.push_back( |
247 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, | 246 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, |
248 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), | 247 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), |
249 inflated_bounds.y(), | 248 inflated_bounds.y(), |
250 inflated_bounds.width(), | 249 inflated_bounds.width(), |
251 inflated_bounds.height())))); | 250 inflated_bounds.height())))); |
252 } | 251 } |
253 } | 252 } |
254 | 253 |
255 } // namespace cc | 254 } // namespace cc |
OLD | NEW |