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

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

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix Android/ChromeOS build problems with bit packed enum class Created 4 years, 11 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
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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698