RFR: 8334495: Use FFM instead of jdk.internal.misc.Unsafe in java.desktop font implementation [v2]

Phil Race prr at openjdk.org
Thu Jun 27 18:29:55 UTC 2024


On Wed, 26 Jun 2024 20:51:18 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8334495
>
> src/java.desktop/share/classes/sun/font/GlyphList.java line 364:
> 
>> 362:          * a native call which does a getPrimitiveArrayCritical and a
>> 363:          * memcpy for the typical amount of image data (30-150 bytes)
>> 364:          * Consider a native method if there is a performance problem (which
> 
> should this comment be removed now that we aren't using the unsafe loop anymore?

Yes, in fact I thought I HAD removed it. Thanks for spotting.

> src/java.desktop/unix/classes/sun/font/XRGlyphCacheEntry.java line 86:
> 
>> 84:         // 'void*' (see field 'cellInfo' of struct 'GlyphInfo'
>> 85:         // in src/share/native/sun/font/fontscalerdefs.h).
>> 86:         // On 64-bit Big-endian architectures it would be wrong to access this
> 
> "wrong to write this field as an int"?

"access" because it is true for read and write.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19777#discussion_r1657620353
PR Review Comment: https://git.openjdk.org/jdk/pull/19777#discussion_r1657619571


More information about the client-libs-dev mailing list