Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Issue 353003002: Simplify (and optimize) SVGTextQuery::characterNumberAtPositionCallback (Closed)

Created:
6 years, 6 months ago by fs
Modified:
6 years, 5 months ago
Reviewers:
pdr.
CC:
blink-reviews, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, fs, ed+blinkwatch_opera.com, krit, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, rwlbuis, Stephen Chennney, rune+blink
Project:
blink
Visibility:
Public.

Description

Simplify (and optimize) SVGTextQuery::characterNumberAtPositionCallback This method needs to iterate the glyphs within a fragment and check if the queried point is contained within any of them. Currently a fragment offset is converted to a offset that's suitable for passing to mapStartEndPositionsIntoFragmentCoordinates - which then in turn maps it into a text box-relative offset and then runs (the costly) modifyStartEndPositionsRespectingLigatures to check if the current range happen to fall within a "multicharacter glyph" (ligatures etc.), and then expand the range appropriately. This is a lot of work, that is better performed by finding the index within the text metrics list for the corresponding RenderSVGInlineText object, and then step through the fragment using the lengths of the individual glyphs. The impact on performance will vary with the length of fragments and the length of the text content. For a case like: <text ...>(AAAAAAAAAA ){99}AAAAAAAAAA</text> (100 groups of ten A's separated by a single whitespace) with a negative query, the speed-up is ~1.2x. With 'word-spacing' added (to get more fragments) the speed-up becomes ~8.7x. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177089

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -12 lines) Patch
M Source/core/rendering/svg/SVGTextQuery.cpp View 1 chunk +13 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
fs
This is the cleanup CL mentioned in some other CL touching this code. Hopefully this ...
6 years, 6 months ago (2014-06-26 16:25:11 UTC) #1
pdr.
On 2014/06/26 16:25:11, fs wrote: > This is the cleanup CL mentioned in some other ...
6 years, 6 months ago (2014-06-26 17:42:50 UTC) #2
fs
The CQ bit was checked by fs@opera.com
6 years, 5 months ago (2014-06-27 09:17:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/353003002/1
6 years, 5 months ago (2014-06-27 09:18:31 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 5 months ago (2014-06-27 10:25:18 UTC) #5
commit-bot: I haz the power
6 years, 5 months ago (2014-06-27 11:04:03 UTC) #6
Message was sent while issue was closed.
Change committed as 177089

Powered by Google App Engine
This is Rietveld 408576698