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

Side by Side Diff: cc/trees/layer_tree_host_common.cc

Issue 156603005: cc: Clean up iterator template to only take 1 parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iteratorcleanup: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 // If we have finished walking all ancestors without having already exited, 2317 // If we have finished walking all ancestors without having already exited,
2318 // then the point is not clipped by any ancestors. 2318 // then the point is not clipped by any ancestors.
2319 return false; 2319 return false;
2320 } 2320 }
2321 2321
2322 LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPoint( 2322 LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPoint(
2323 const gfx::PointF& screen_space_point, 2323 const gfx::PointF& screen_space_point,
2324 const LayerImplList& render_surface_layer_list) { 2324 const LayerImplList& render_surface_layer_list) {
2325 LayerImpl* found_layer = NULL; 2325 LayerImpl* found_layer = NULL;
2326 2326
2327 typedef LayerIterator<LayerImpl, 2327 typedef LayerIterator<LayerImpl> LayerIteratorType;
2328 LayerImplList,
2329 RenderSurfaceImpl,
2330 LayerIteratorActions::FrontToBack> LayerIteratorType;
2331 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list); 2328 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list);
2332
2333 for (LayerIteratorType 2329 for (LayerIteratorType
2334 it = LayerIteratorType::Begin(&render_surface_layer_list); 2330 it = LayerIteratorType::Begin(&render_surface_layer_list);
2335 it != end; 2331 it != end;
2336 ++it) { 2332 ++it) {
2337 // We don't want to consider render_surfaces for hit testing. 2333 // We don't want to consider render_surfaces for hit testing.
2338 if (!it.represents_itself()) 2334 if (!it.represents_itself())
2339 continue; 2335 continue;
2340 2336
2341 LayerImpl* current_layer = (*it); 2337 LayerImpl* current_layer = (*it);
2342 2338
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 // At this point, we think the point does hit the touch event handler region 2397 // At this point, we think the point does hit the touch event handler region
2402 // on the layer, but we need to walk up the parents to ensure that the layer 2398 // on the layer, but we need to walk up the parents to ensure that the layer
2403 // was not clipped in such a way that the hit point actually should not hit 2399 // was not clipped in such a way that the hit point actually should not hit
2404 // the layer. 2400 // the layer.
2405 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) 2401 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl))
2406 return false; 2402 return false;
2407 2403
2408 return true; 2404 return true;
2409 } 2405 }
2410 } // namespace cc 2406 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698