Merge "Optimise the hit test algorithm" into oc-dev