RFR: 8337237: Use FFM instead of Unsafe for Java 2D RenderBuffer class [v2]

Phil Race prr at openjdk.org
Fri Jul 26 22:59:29 UTC 2024


On Fri, 26 Jul 2024 08:39:47 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8337237
>
> src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java line 144:
> 
>> 142:             int offsetInBytes = offset * SIZEOF_BYTE;
>> 143:             int lengthInBytes = length * SIZEOF_BYTE;
>> 144:             MemorySegment.copy(x, offsetInBytes, segment, JAVA_BYTE, curOffset, length);
> 
> This needs to be fixed too (similar comment as the one @JornVernee left below).

yes, the pattern is the same, probably why Jorn only pointed out one of them

> src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java line 274:
> 
>> 272:             int offsetInBytes = offset * SIZEOF_LONG;
>> 273:             int lengthInBytes = length * SIZEOF_LONG;
>> 274:             MemorySegment.copy(x, offsetInBytes, segment, JAVA_LONG, curOffset, length);
> 
> This needs fixing too.

yes

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20339#discussion_r1693429656
PR Review Comment: https://git.openjdk.org/jdk/pull/20339#discussion_r1693431256


More information about the client-libs-dev mailing list