On Mon, 9 Jun 2025 19:15:35 GMT, Phil Race <p...@openjdk.org> wrote:

>> Kevin Rushforth has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Remove unneeded "length" field, using segment,byteSize() instead
>>   Fix description of resize method.
>>   Minor whitespace changes
>
> modules/javafx.graphics/src/main/java/com/sun/marlin/MaskMarlinAlphaConsumer.java
>  line 110:
> 
>> 108: 
>> 109:         for (int i = 0; i < _ALPHA_MAP.length; i++) {
>> 110:             ALPHA_MAP_OFF_HEAP.putByte(i, _ALPHA_MAP[i]);
> 
> I guess this is only done once, but following multiple layers of calculation 
> I think this array defaults to 64K long, in which case a bulk copy would be 
> better, but it is perhaps out-of-scope for a 1:1 replacement
> 
> https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/foreign/MemorySegment.html#copy(java.lang.Object,int,java.lang.foreign.MemorySegment,java.lang.foreign.ValueLayout,long,int)

Thanks. This seems like a good follow-up RFE. I'll file it.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1814#discussion_r2136371921

Reply via email to