DescriptionOptimize the characterNumberAtPositionCallback text query
Refactor the calculateGlyphPositionWithoutTransform and
calculateGlyphBoundaries helpers to get logicalGlyphPositionToPhysical
and physicalGlyphExtents.
Use the new methods to implement characterNumberAtPositionCallback as an
iteration over the contributing glyphs, thereby avoiding the O(n^2) for
glyph bounds calculation.
Also fold calculateFragmentBoundaries into
characterNumberAtPositionCallback, because it is trivial, and most of it
is needed for the remaining part of the function too.
Committed: https://crrev.com/4be79e4d348ae00cd5ad7f78b3e3d9f5bf5d6842
Cr-Commit-Position: refs/heads/master@{#382557}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Tidy up comment. #
Depends on Patchset: Messages
Total messages: 10 (4 generated)
|