Partially fix perf regression in HitTestContentsForFragments().
Copying a HitTestLocation object has a cost in the (micro)benchmark perf_tests/events/hit-test-lots-of-layers.html , so only do this when it's necessary. This still doesn't bring performance back to what it used to be prior to CL:2490111, but the second half of the regression is due to the fact that HitTestContentsForFragments() no longer gets inlined automatically, presumably because the code size now exceeds some magical limit. Had to update a DCHECK in LayoutInline::NodeAtPoint(), since we now only set a target fragment if there is more than one of them. Bug: 1142801b Change-Id: I7845aac259a187610e8cf929d5859875af436d51 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503555Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Koji Ishii <kojii@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#821889}
Showing
Please register or sign in to comment