[automerger] Optimise the hit test algorithm am: 3b6f84b77c am: 5b224ccf41 skipped: eb86ac42e6 am: a60d0b2e93 am: a16b03c540 am: acb5b014af am: c62d510887 am: ea648c6a2b am: 83d9688077

Change-Id: I2e91e2573efec1a54eef83a93dfc7b99f20cda7b