Use ink overflow to optimize selection text painter
When r752093 crrev.com/c/2111553 optimized two-pass paints of selected text, it used frame rect. This patch changes it to use ink-overflow instead. Using ink-overflow as is can cause the similar performance regression as crbug.com/1062767. From the investigations on blink_perf.paint/select-all-words, the count of 2-pass paint and average speed vary by: 2-pass Avg Frame rect 29 0.0% 3194.094500003848ms Ink overflow 5585 -8.3% 3457.8985000087414ms Ink overflow w/1px inflation 449 -0.9% 3222.998499998357ms Ink overflow w/2px inflation 14 +0.2% 3186.6954999917652ms This patch uses 1px inflation for the balance between the correctness and the performance. Bug: 1108580 Change-Id: I5584461a5b605c77f457181fa597202fa33c4ca1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315897Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#791360}
Showing
