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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 property_trees_.transform_tree, property_trees_.clip_tree, | 1692 property_trees_.transform_tree, property_trees_.clip_tree, |
1693 use_property_trees, &data_for_recursion); | 1693 use_property_trees, &data_for_recursion); |
1694 return data_for_recursion.closest_match; | 1694 return data_for_recursion.closest_match; |
1695 } | 1695 } |
1696 | 1696 |
1697 struct HitTestVisibleScrollableOrTouchableFunctor { | 1697 struct HitTestVisibleScrollableOrTouchableFunctor { |
1698 bool operator()(LayerImpl* layer) const { | 1698 bool operator()(LayerImpl* layer) const { |
1699 return layer->IsDrawnRenderSurfaceLayerListMember() || | 1699 return layer->IsDrawnRenderSurfaceLayerListMember() || |
1700 ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) || | 1700 ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) || |
1701 !layer->touch_event_handler_region().IsEmpty() || | 1701 !layer->touch_event_handler_region().IsEmpty() || |
1702 layer->have_wheel_event_handlers(); | 1702 layer->wheel_event_properties() != EventListenerProperties::NONE; |
1703 } | 1703 } |
1704 }; | 1704 }; |
1705 | 1705 |
1706 LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPoint( | 1706 LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPoint( |
1707 const gfx::PointF& screen_space_point) { | 1707 const gfx::PointF& screen_space_point) { |
1708 if (!root_layer()) | 1708 if (!root_layer()) |
1709 return NULL; | 1709 return NULL; |
1710 bool update_lcd_text = false; | 1710 bool update_lcd_text = false; |
1711 if (!UpdateDrawProperties(update_lcd_text)) | 1711 if (!UpdateDrawProperties(update_lcd_text)) |
1712 return NULL; | 1712 return NULL; |
(...skipping 27 matching lines...) Expand all Loading... |
1740 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl, | 1740 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl, |
1741 transform_tree, clip_tree, | 1741 transform_tree, clip_tree, |
1742 use_property_trees)) | 1742 use_property_trees)) |
1743 return false; | 1743 return false; |
1744 | 1744 |
1745 return true; | 1745 return true; |
1746 } | 1746 } |
1747 | 1747 |
1748 struct FindWheelEventLayerFunctor { | 1748 struct FindWheelEventLayerFunctor { |
1749 bool operator()(LayerImpl* layer) const { | 1749 bool operator()(LayerImpl* layer) const { |
1750 return layer->have_wheel_event_handlers(); | 1750 return layer->wheel_event_properties() != EventListenerProperties::NONE; |
1751 } | 1751 } |
1752 }; | 1752 }; |
1753 | 1753 |
1754 LayerImpl* LayerTreeImpl::FindLayerWithWheelHandlerThatIsHitByPoint( | 1754 LayerImpl* LayerTreeImpl::FindLayerWithWheelHandlerThatIsHitByPoint( |
1755 const gfx::PointF& screen_space_point) { | 1755 const gfx::PointF& screen_space_point) { |
1756 if (!root_layer()) | 1756 if (!root_layer()) |
1757 return NULL; | 1757 return NULL; |
1758 bool update_lcd_text = false; | 1758 bool update_lcd_text = false; |
1759 if (!UpdateDrawProperties(update_lcd_text)) | 1759 if (!UpdateDrawProperties(update_lcd_text)) |
1760 return NULL; | 1760 return NULL; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2073 const gfx::BoxF& box, | 2073 const gfx::BoxF& box, |
2074 gfx::BoxF* bounds) const { | 2074 gfx::BoxF* bounds) const { |
2075 *bounds = gfx::BoxF(); | 2075 *bounds = gfx::BoxF(); |
2076 return layer_tree_host_impl_->animation_host() | 2076 return layer_tree_host_impl_->animation_host() |
2077 ? layer_tree_host_impl_->animation_host() | 2077 ? layer_tree_host_impl_->animation_host() |
2078 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 2078 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
2079 : true; | 2079 : true; |
2080 } | 2080 } |
2081 | 2081 |
2082 } // namespace cc | 2082 } // namespace cc |
OLD | NEW |