On Thu, 22 Oct 2026 18:45:03 GMT, Andy Goryachev <[email protected]> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Eliminate need for conditional dispose
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java
>  line 1517:
> 
>> 1515:     public PlatformImage createPlatformImage(int w, int h) {
>> 1516:         IntBuffer buf = IntBuffer.allocate(w * h);
>> 1517:         return com.sun.prism.Image.fromIntArgbPreData(buf, w, h);
> 
> One problem with this change is that `INT_ARGB_PRE` is not accepted by 
> `WindowStage.findBestImage()`, which will cause it ignore any new 
> `WritebleImage`s in `Stage.getIcons()`

Good find -- I've solved this by simply supporting the format.

> modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWDrawingContext.java 
> line 232:
> 
>> 230:         this.graphics = (SWGraphics)texture.createGraphics();
>> 231: 
>> 232:         FXCleaner.register(this, new StateCleaner(resourceFactory, 
>> texture));
> 
> SWRTTexture creates Pisces renderer in L168 which is not released by the 
> StateCleaner.  Will this leak native resources?

No, renderer cleans itself up (`Disposer.addRecord(this, new 
PiscesRendererDisposerRecord(nativePtr));`)

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4354560668
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r4354554108

Reply via email to