[OpenJDK 2D-Dev] RFR: 8210384: SunLayoutEngine.isAAT() font is expensive on MacOS
dmitry.markov at oracle.com
Sun Sep 9 09:55:59 UTC 2018
The fix looks good to me.
These changes will be useful for JDK 8u too. So I will back-port them once https://bugs.openjdk.java.net/browse/JDK-8201801 <https://bugs.openjdk.java.net/browse/JDK-8201801> is integrated.
> On 8 Sep 2018, at 20:51, Philip Race <philip.race at oracle.com> wrote:
> bug: https://bugs.openjdk.java.net/browse/JDK-8210384
> webrev: http://cr.openjdk.java.net/~prr/8210384/
> AAT is the Apple alternative to OpenType layout.
> Calls to the Harfbuzz layout engine need to pass a flag which says whether the font is an AAT font
> because we need to set up transforms differently. It is also looking like it is needed for JDK 8
> with ICU because of problems handling AAT fonts there.
> The current way of doing this via checking if there is a morx table is really expensive.
> So this fix adds a low-cost cache of the result.
> No regression test because it is a performance fix but I did check the effect.
> In a quick test rendering about 15 strings which broke up into 132 different runs,
> this reduced overall rendering time by 50% (and that includes the time to draw the glyphs,
> so it is an even bigger component of layout).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev