commit | 8bdb03f38dc9a05959906ccbfed9e748e2609410 | [log] [tgz] |
---|---|---|
author | Koji Ishii <kojii@chromium.org> | Tue Jan 08 04:34:35 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jan 08 04:34:35 2019 |
tree | f7e3b6c61912447d1fd20985f34bc0b7e493b86b | |
parent | cd2da3182bfb7dce4a1967bf91fa0c4fb31e958b [diff] |
Change ShapeResult::LimitNumGlyphs to use binary-search CL:1370147 discusses the possibility of the pre-shape limit. Pre-shape limit is faster because it has character array and that the limit is index-based operations. Dominik pointed out that the post-shape limit is still needed even if we have the pre-shape limit because HarfBuzz cluster is different from the Unicode grapheme cluster, and also the pre-shape limit may be incorrect for the same reason. This patch changes ShapeResult::LimitNumGlyphs to use binary search algorithm to speed it up when the pre-shape limit was different from HarfBuzz cluster, or when we may not have the pre-shape limit. This change improves long-line-nowrap by 17%. https://pinpoint-dot-chromeperf.appspot.com/job/1492a623140000 This patch has no behavior changes. Tests for this change is covered by: HarfBuzzShaperTest/ShapeParameterTest.MaxGlyphs {Simple,ClusterLatin,ClusterLatin2,ClusterDevanagari} /{0,1} (0 and 1 are for LTR and RTL) Bug: 636993, 893967 Change-Id: Ifdf2d094e72cdfc6259d72d4e27511679b095ab2 Reviewed-on: https://chromium-review.googlesource.com/c/1388356 Reviewed-by: Dominik Röttsches <drott@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#620620}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .