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

Side by Side Diff: cc/debug/debug_rect_history.cc

Issue 1639363002: Move have_wheel_event_handlers to WebLayerTreeView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove blank line Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/input/input_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "cc/layers/layer_iterator.h" 11 #include "cc/layers/layer_iterator.h"
12 #include "cc/layers/layer_utils.h" 12 #include "cc/layers/layer_utils.h"
13 #include "cc/layers/render_surface_impl.h" 13 #include "cc/layers/render_surface_impl.h"
14 #include "cc/trees/damage_tracker.h" 14 #include "cc/trees/damage_tracker.h"
15 #include "cc/trees/layer_tree_host.h" 15 #include "cc/trees/layer_tree_host.h"
16 #include "cc/trees/layer_tree_host_common.h" 16 #include "cc/trees/layer_tree_host_common.h"
17 #include "cc/trees/layer_tree_impl.h"
17 #include "ui/gfx/geometry/rect_conversions.h" 18 #include "ui/gfx/geometry/rect_conversions.h"
18 19
19 namespace cc { 20 namespace cc {
20 21
21 // static 22 // static
22 scoped_ptr<DebugRectHistory> DebugRectHistory::Create() { 23 scoped_ptr<DebugRectHistory> DebugRectHistory::Create() {
23 return make_scoped_ptr(new DebugRectHistory()); 24 return make_scoped_ptr(new DebugRectHistory());
24 } 25 }
25 26
26 DebugRectHistory::DebugRectHistory() {} 27 DebugRectHistory::DebugRectHistory() {}
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 174 }
174 } 175 }
175 176
176 void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* layer) { 177 void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* layer) {
177 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { 178 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
178 SaveWheelEventHandlerRectsCallback(layer); 179 SaveWheelEventHandlerRectsCallback(layer);
179 }); 180 });
180 } 181 }
181 182
182 void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) { 183 void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) {
183 if (!layer->have_wheel_event_handlers()) 184 if (!layer->layer_tree_impl()->have_wheel_event_handlers())
184 return; 185 return;
185 186
186 debug_rects_.push_back( 187 debug_rects_.push_back(
187 DebugRect(WHEEL_EVENT_HANDLER_RECT_TYPE, 188 DebugRect(WHEEL_EVENT_HANDLER_RECT_TYPE,
188 MathUtil::MapEnclosingClippedRect(layer->ScreenSpaceTransform(), 189 MathUtil::MapEnclosingClippedRect(layer->ScreenSpaceTransform(),
189 gfx::Rect(layer->bounds())))); 190 gfx::Rect(layer->bounds()))));
190 } 191 }
191 192
192 void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) { 193 void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) {
193 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { 194 LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 debug_rects_.push_back( 240 debug_rects_.push_back(
240 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, 241 DebugRect(ANIMATION_BOUNDS_RECT_TYPE,
241 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), 242 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(),
242 inflated_bounds.y(), 243 inflated_bounds.y(),
243 inflated_bounds.width(), 244 inflated_bounds.width(),
244 inflated_bounds.height())))); 245 inflated_bounds.height()))));
245 } 246 }
246 } 247 }
247 248
248 } // namespace cc 249 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/input/input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698