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

Issue 355173002: Add per-fragment early-out for getCharNumAtPosition (Closed)

Created:
6 years, 5 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

Add per-fragment early-out for getCharNumAtPosition Since this is a spatial query, and a SVGTextFragment already contain an approximation of it's own bounds, we can use those to perform a reasonably efficient early-rejection test. As an example: A TC using the textPath-data from issue 267504 [1] and a mouse-move handler that uses getCharNumAtPosition to check which "character" (glyph) is under the pointer consumes 0.005-0.2ms, compared to 0.2-0.5ms without this patch (before the CL in [2], this was 5-10ms!). The TC mentioned in [2] now also weighs in at a few thousand us at worst. [1] http://jsbin.com/imajow/1/quiet [2] https://codereview.chromium.org/353003002 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177230

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -0 lines) Patch
M Source/core/rendering/svg/SVGTextQuery.cpp View 2 chunks +17 lines, -0 lines 1 comment Download

Messages

Total messages: 5 (0 generated)
fs
https://codereview.chromium.org/355173002/diff/1/Source/core/rendering/svg/SVGTextQuery.cpp File Source/core/rendering/svg/SVGTextQuery.cpp (right): https://codereview.chromium.org/355173002/diff/1/Source/core/rendering/svg/SVGTextQuery.cpp#newcode520 Source/core/rendering/svg/SVGTextQuery.cpp:520: return fragmentTransform.mapRect(fragmentRect); (Pondered putting these last four lines in ...
6 years, 5 months ago (2014-06-27 14:16:04 UTC) #1
pdr.
On 2014/06/27 14:16:04, fs wrote: > https://codereview.chromium.org/355173002/diff/1/Source/core/rendering/svg/SVGTextQuery.cpp > File Source/core/rendering/svg/SVGTextQuery.cpp (right): > > https://codereview.chromium.org/355173002/diff/1/Source/core/rendering/svg/SVGTextQuery.cpp#newcode520 > ...
6 years, 5 months ago (2014-06-30 17:57:36 UTC) #2
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 5 months ago (2014-06-30 17:57:38 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/355173002/1
6 years, 5 months ago (2014-06-30 17:59:11 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-06-30 18:02:40 UTC) #5
Message was sent while issue was closed.
Change committed as 177230

Powered by Google App Engine
This is Rietveld 408576698