commit | fcd30ad7eb6b47aba79b8f28472cdf831fabe670 | [log] [tgz] |
---|---|---|
author | Peilin Wang <peilinwang@google.com> | Tue Jun 13 23:14:02 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jun 13 23:14:02 2023 |
tree | 793606507b0f794c9fb3227c1193c39ce9ea8090 | |
parent | 7297a7d3ed3282679da65c4f15fd048f9b140d6a [diff] |
[Omnibox] Optimize ScrollToTLD ScrollToTLD uses Layout.getOffsetForHorizontal() to calculate the index of the last visible character, but this can take tens of ms. This cl optimizes away some calls, and replaces getOffsetForHorizontal() with Paint.getOffsetForAdvance(), which is ~12 times faster. Bug: 1432727 Change-Id: I004e7f803ed7d8d26d50f8f8256d7e74a1b5d045 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4608621 Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: Peilin Wang <peilinwang@google.com> Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1157240}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.