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

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

Issue 1843813002: Fix issue with hit testing on the layer tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | cc/trees/layer_tree_impl_unittest.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_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 FindClosestMatchingLayer( 1784 FindClosestMatchingLayer(
1785 screen_space_point, root_layer(), FindScrollingLayerFunctor(), 1785 screen_space_point, root_layer(), FindScrollingLayerFunctor(),
1786 property_trees_.transform_tree, property_trees_.clip_tree, &state); 1786 property_trees_.transform_tree, property_trees_.clip_tree, &state);
1787 return state.closest_match; 1787 return state.closest_match;
1788 } 1788 }
1789 1789
1790 struct HitTestVisibleScrollableOrTouchableFunctor { 1790 struct HitTestVisibleScrollableOrTouchableFunctor {
1791 bool operator()(LayerImpl* layer) const { 1791 bool operator()(LayerImpl* layer) const {
1792 return layer->IsDrawnRenderSurfaceLayerListMember() || 1792 return layer->IsDrawnRenderSurfaceLayerListMember() ||
1793 ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) || 1793 ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) ||
1794 !layer->touch_event_handler_region().IsEmpty() || 1794 !layer->touch_event_handler_region().IsEmpty();
1795 layer->layer_tree_impl()->event_listener_properties(
1796 EventListenerClass::kMouseWheel) !=
1797 EventListenerProperties::kNone;
1798 } 1795 }
1799 }; 1796 };
1800 1797
1801 LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPoint( 1798 LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPoint(
1802 const gfx::PointF& screen_space_point) { 1799 const gfx::PointF& screen_space_point) {
1803 if (!root_layer()) 1800 if (!root_layer())
1804 return NULL; 1801 return NULL;
1805 bool update_lcd_text = false; 1802 bool update_lcd_text = false;
1806 if (!UpdateDrawProperties(update_lcd_text)) 1803 if (!UpdateDrawProperties(update_lcd_text))
1807 return NULL; 1804 return NULL;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 } 2102 }
2106 2103
2107 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) { 2104 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) {
2108 layers_that_should_push_properties_.clear(); 2105 layers_that_should_push_properties_.clear();
2109 for (auto* layer : *this) 2106 for (auto* layer : *this)
2110 layer->ResetChangeTracking(); 2107 layer->ResetChangeTracking();
2111 property_trees_.ResetAllChangeTracking(flag); 2108 property_trees_.ResetAllChangeTracking(flag);
2112 } 2109 }
2113 2110
2114 } // namespace cc 2111 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698