Bug 1618132 - Avoid redundant hit test tree builds. r=gw
Bug 1618132 - Avoid redundant hit test tree builds. r=gw

build_frame is called by update_document which calls rebuild_hit_tester if the hit test tree is invalidated. The advantage of doing it there is that it is after the frame has been submitted to the renderer so we are out of the critical path and the work can overlap with draw call submission.

So we don't need to do the work in build_frame, and since we don't currently set the validity flag there we are often re-building the hit test tree a second time after frame building.

Differential Revision: https://phabricator.services.mozilla.com/D64328

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/2c6a51317166bb8b3c90781b3bc7739448c72a0b

servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender