RFR: 8324941: POC for Headless platform for JavaFX [v4]
    Johan Vos 
    jvos at openjdk.org
       
    Mon Jul  7 09:29:22 UTC 2025
    
    
  
On Fri, 27 Jun 2025 20:19:24 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Process reviewer comments
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/headless/HeadlessWindow.java line 329:
> 
>> 327:             for (int j = 0; j < width; j++) {
>> 328:                 int idx = i * width + j;
>> 329:                 int fidx = (y + i) * 1000 + x + j;
> 
> where does 1000 come from?
it's the stride used in the ByteBuffer holding the frame. I've moved it to a final int and removed all hard occurrences of 1000 .
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/headless/HeadlessWindow.java line 341:
> 
>> 339:         int offsetX = this.getX();
>> 340:         int offsetY = this.getY();
>> 341:         int stride = 1000;
> 
> same magic 1000 here
it's the stride used in the ByteBuffer holding the frame. I've moved it to a final int and removed all hard occurrences of 1000 .
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/headless/HeadlessWindow.java line 356:
> 
>> 354: 
>> 355:     void clearRect(int x0, int w0, int y0, int h0) {
>> 356:         int stride = 1000;
> 
> and here...
it's the stride used in the ByteBuffer holding the frame. I've moved it to a final int and removed all hard occurrences of 1000 .
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1836#discussion_r2189477073
PR Review Comment: https://git.openjdk.org/jfx/pull/1836#discussion_r2189477376
PR Review Comment: https://git.openjdk.org/jfx/pull/1836#discussion_r2189477514
    
    
More information about the openjfx-dev
mailing list