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

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

Issue 399953004: Remove flag to disable cc touch hit testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/base/switches.cc ('k') | cc/trees/layer_tree_settings.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 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 active_tree_->FindLayerThatIsHitByPoint(device_viewport_point); 476 active_tree_->FindLayerThatIsHitByPoint(device_viewport_point);
477 477
478 bool scroll_on_main_thread = false; 478 bool scroll_on_main_thread = false;
479 LayerImpl* scrolling_layer_impl = FindScrollLayerForDeviceViewportPoint( 479 LayerImpl* scrolling_layer_impl = FindScrollLayerForDeviceViewportPoint(
480 device_viewport_point, type, layer_impl, &scroll_on_main_thread, NULL); 480 device_viewport_point, type, layer_impl, &scroll_on_main_thread, NULL);
481 return CurrentlyScrollingLayer() == scrolling_layer_impl; 481 return CurrentlyScrollingLayer() == scrolling_layer_impl;
482 } 482 }
483 483
484 bool LayerTreeHostImpl::HaveTouchEventHandlersAt( 484 bool LayerTreeHostImpl::HaveTouchEventHandlersAt(
485 const gfx::Point& viewport_point) { 485 const gfx::Point& viewport_point) {
486 if (!settings_.touch_hit_testing)
487 return true;
488 486
489 gfx::PointF device_viewport_point = 487 gfx::PointF device_viewport_point =
490 gfx::ScalePoint(viewport_point, device_scale_factor_); 488 gfx::ScalePoint(viewport_point, device_scale_factor_);
491 489
492 LayerImpl* layer_impl = 490 LayerImpl* layer_impl =
493 active_tree_->FindLayerThatIsHitByPointInTouchHandlerRegion( 491 active_tree_->FindLayerThatIsHitByPointInTouchHandlerRegion(
494 device_viewport_point); 492 device_viewport_point);
495 493
496 return layer_impl != NULL; 494 return layer_impl != NULL;
497 } 495 }
(...skipping 2743 matching lines...) Expand 10 before | Expand all | Expand 10 after
3241 } 3239 }
3242 3240
3243 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3241 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3244 std::vector<PictureLayerImpl*>::iterator it = 3242 std::vector<PictureLayerImpl*>::iterator it =
3245 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3243 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3246 DCHECK(it != picture_layers_.end()); 3244 DCHECK(it != picture_layers_.end());
3247 picture_layers_.erase(it); 3245 picture_layers_.erase(it);
3248 } 3246 }
3249 3247
3250 } // namespace cc 3248 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/switches.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698