[Webkit-unassigned] [Bug 141570] textPath layout performance improvement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 13 22:41:09 PST 2015


Ralph T <ralpht+bugs at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |ralpht+bugs at gmail.com

--- Comment #2 from Ralph T <ralpht+bugs at gmail.com> ---
In SVGTextLayoutEngine.cpp:557:

bool ok = false;
FloatPoint point = m_textPath.pointAtLength(textPathOffset, ok);

x = point.x();
y = point.y();
angle = m_textPath.normalAngleAtLength(textPathOffset, ok);

m_textPath is a Path, where the core of pointAtLength and normalAngleAtLength vary form platform to platform, but I think they all play the whole path back from the start.

Two possible improvements:
 - merge pointAtLength and normalAngleAtLength so the path only has to be walked once.
 - fix path iteration to continue from the last queried point instead of the start if the current query is ahead of the previous query (the SVG code walks the path sequentially because it's using glyph offsets, so this is a huge improvement).

The code currently is a bottleneck for animating the offset of text on a path.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150214/b2bcae7e/attachment-0002.html>

More information about the webkit-unassigned mailing list