[Webkit-unassigned] [Bug 105230] [Graphics] PathTraversalState.cpp does too many sqrts!

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 17 21:59:36 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=105230





--- Comment #2 from Philip Rogers <pdr at google.com>  2012-12-17 22:01:53 PST ---
(In reply to comment #1)
> It appears I added this code... 6 years ago.
> http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/PathTraversalState.cpp

I think you can be exonerated... this time ;)

In laying out text on a path in SVGTextLayoutEngine::layoutTextOnLineOrPath(...), both pointAtLength(..) and normalAngleAtLength(..) are called for each character. Each of these methods walks the entire path to determine the character's point&normal. Boo, O(n^2).

We should store the PathTraversalState and have it inch forward for each character instead.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list