Comment 33 for bug 560795

Revision history for this message
In , Behdad-t (behdad-t) wrote :

Hi Dominik,

Comments below. This is getting offtopic, so feel free to email me for followup discussion.

(In reply to comment #30)
> (In reply to comment #29)
>
> Thanks, Behdad.
>
> > > Get rid of the simple path altogether, in WebKit?
> >
> > Yes, that's the way it should be IMO. The reason it's not possible right now, is because WebKit does not cache shaping results. As such, every time text is being shown, it's being shaped and shown. That's why supposedly the complex text path is "too slow" for common usage. With effective caching it's possible to turn full shaping on for all scripts. Indeed, that's what Firefox does.
>
> I don't know enough about it yet - but out of curiosity: would you have to cache the shaping coordinate results for arbitrary string length or is it a matter of caching the results for individual pairs of codepoints?

No "pairs of codepoints"...

The way I would do is to start by simply caching the glyph list of each text run. When the text is changed, invalidate the cache.

Firefox goes one step further: they also cache the shaping result of individual words, so they can put the glyphs for a run together by looking up individual words. That has other issues, but can be made to work.

> > I don't have any heuristics in mind. You can start by adding Serbian, and then add other languages when people nag.
>
> We can call it the nag-heuristic :-)

+1!