function hitTest (e, rootLayer, rootNode) {
  var touch = e.touches ? e.touches[0] : e;
  var touchX = touch.pageX;
  var touchY = touch.pageY;
  var rootNodeBox;
  if (rootNode) {
    rootNodeBox = rootNode.getBoundingClientRect();
    touchX -= rootNodeBox.left;
    touchY -= rootNodeBox.top;
  }

  touchY = touchY - window.pageYOffset;
  touchX = touchX - window.pageXOffset;
  return getLayerAtPoint(
    rootLayer,
    e.type,
    FrameUtils.make(touchX, touchY, 1, 1),
    rootLayer.translateX || 0,
    rootLayer.translateY || 0
  );
}
RenderLayer hit testing

@param {Event} e
@param {RenderLayer} rootLayer
@param {?HTMLElement} rootNode
@return {RenderLayer}