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

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

Issue 1646603004: Move scroll event handlers from layer to layer tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_cc_listeners
Patch Set: Rebase 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/layers/layer.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"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698