<AWT Dev> RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
Alexey Ushakov
avu at openjdk.java.net
Tue Aug 3 19:56:28 UTC 2021
On Tue, 3 Aug 2021 06:46:07 GMT, Alexey Ushakov <avu at openjdk.org> wrote:
>> I need to look at it closely, I do not understand why we made the native layer opaque=NO by default while the java code uses opaque=true by default. And then we reset the native code from NO to yes by the code above. Why we cannot make both native/java use true/YES and when necessary it will be reset to false/NO by the existing code(via LWWindowPeer.setOpaque() and LWWindowPeer.updateOpaque?)
>> BTW Probably implementation of LWWindowPeer.setTextured() should call the updateOpaque() as well.
>
> Yes, sounds reasonable. Moreover, It was my initial attempt but I faced with some regressions in SwingSet2 demo. In some cases background of tree nodes become black and this artifact was reproducible only if some other tabs were clicked before. It was hot time for jdk17 so I decided not to fight with this regression. Now we have more time, so I can spend more time on this.
Looks like making MTLLayer opaque by default require much more time that I expected. I tried different things to resolve artefacts that I mentioned before but nothing seems to work. So, I suggest to stick with my latest approach. It passes all the tests and don't break SwingSet2.
> BTW Probably implementation of LWWindowPeer.setTextured() should call the updateOpaque() as well.
I'll add this change
-------------
PR: https://git.openjdk.java.net/jdk/pull/4946
More information about the awt-dev
mailing list