Index: cc/layer_tree_host_impl.cc |
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc |
index 73568ffc3980770b8d8d75d02428522e7cf3552d..78d2d95ffc90a5b2f0720e2d5888be8457fcc23d 100644 |
--- a/cc/layer_tree_host_impl.cc |
+++ b/cc/layer_tree_host_impl.cc |
@@ -320,6 +320,21 @@ void LayerTreeHostImpl::scheduleAnimation() |
m_client->setNeedsRedrawOnImplThread(); |
} |
+bool LayerTreeHostImpl::checkTouchEventHandlerRegionHit(const gfx::Point& viewportPoint) |
+{ |
+ |
+ gfx::PointF deviceViewportPoint = viewportPoint.Scale(m_deviceScaleFactor); |
+ |
+ // First find out which layer was hit from the saved list of visible layers |
+ // in the most recent frame. |
+ LayerImpl* layerImplHitByPointInTouchHandlerRegion = LayerTreeHostCommon::findLayerThatIsHitByPointInTouchHandlerRegion(deviceViewportPoint, m_renderSurfaceLayerList); |
+ |
+ if (layerImplHitByPointInTouchHandlerRegion) |
+ return true; |
+ |
+ return false; |
+} |
+ |
void LayerTreeHostImpl::trackDamageForAllSurfaces(LayerImpl* rootDrawLayer, const LayerList& renderSurfaceLayerList) |
{ |
// For now, we use damage tracking to compute a global scissor. To do this, we must |