Bug 99524 - zooming with text-rendering: geometricPrecision is very janky
Summary: zooming with text-rendering: geometricPrecision is very janky
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 16:29 PDT by Eric Seidel (no email)
Modified: 2012-10-16 17:43 PDT (History)
4 users (show)

See Also:


Attachments
attachment 168805 with text-rendering: geometricPrecision set on the root element (note how laggy zooming is!) (103.72 KB, image/svg+xml)
2012-10-16 16:30 PDT, Eric Seidel (no email)
no flags Details
sample of attachment 168805 zooming (fast-text path) (734.42 KB, application/zip)
2012-10-16 16:31 PDT, Eric Seidel (no email)
no flags Details
sample of attachment 169052 zooming (complex text path), notice all the mallocs in under ComplexTextController (843.61 KB, application/zip)
2012-10-16 16:32 PDT, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2012-10-16 16:29:30 PDT
zooming with text-rendering: geometricPrecision is very janky

It appears that you get sent down the complex-text path with geometricPrecision (not too surprising), and thus we end up in malloc-city!

https://bug-99383-attachments.webkit.org/attachment.cgi?id=168805 is the SVG in question, I'll attach a version of it with text-rendering: geometricPrecision enabled.
Comment 1 Eric Seidel (no email) 2012-10-16 16:30:33 PDT
Created attachment 169052 [details]
attachment 168805 [details] with text-rendering: geometricPrecision set on the root element (note how laggy zooming is!)
Comment 2 Eric Seidel (no email) 2012-10-16 16:31:22 PDT
Created attachment 169053 [details]
sample of attachment 168805 [details] zooming (fast-text path)
Comment 3 Eric Seidel (no email) 2012-10-16 16:32:29 PDT
Created attachment 169055 [details]
sample of attachment 169052 [details] zooming (complex text path), notice all the mallocs in under ComplexTextController
Comment 4 Eric Seidel (no email) 2012-10-16 16:49:42 PDT
I see.  geometricPrecision enables ligatures/kerning typesetting features:

TypesettingFeatures typesettingFeatures() const
{
...
        case GeometricPrecision:
        case OptimizeLegibility:
            features |= Kerning | Ligatures;
            break;

Which then causes us to go down the complex text path:

Font::CodePath Font::codePath(const TextRun& run) const
{
...
    if (run.length() > 1 && !WidthIterator::supportsTypesettingFeatures(*this))
        return Complex;

I suspect that this is "expected" behavior.  Although perhaps it's possible to optimize this case, or the complex text path in general.  Mitz would know much better than I.


I should note that I was turning on geometric-precision to get around the font-stair-stepping, which is covered by bug 60317.