[OpenJDK 2D-Dev] RFR: 8210384: SunLayoutEngine.isAAT() font is expensive on MacOS

Krishna Addepalli krishna.addepalli at oracle.com
Sun Sep 9 02:57:39 UTC 2018


Looks good to me!

Thanks
Krishna

> On 09-Sep-2018, at 1:21 AM, 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).
> 
> -phil.
> 
> 
> 
> 



More information about the 2d-dev mailing list