| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |