On Thu, 25 Jul 2024 23:57:35 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java line 73:
>> 
>>> 71:     private final long baseAddress;
>>> 72:     private long curOffset;
>>> 73:     private final int capacity;
>> 
>> You could perhaps drop the `capacity` field, and use `segment.byteSize()` in 
>> it's place.
>
> P.S. same for `baseAddress` I think. Looks like it's only used in 
> `getAddress` now. Could replace with `segment.address()`.

I guess .. they were finals so I expect this was considered optimal but it 
seems unlikely to matter.

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

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

Reply via email to