Regarding making MTLLayer transparent
ajit.ghaisas at oracle.com
Wed Aug 12 13:49:25 UTC 2020
Hi Alexey and Jay,
I am working on JDK-8243547 <https://bugs.openjdk.java.net/browse/JDK-8243547> - Lanai - Netbeans IDE has BLACK background for the Toolbar and Statusbar.
I checked about how to implement clear color rendering in metal - (See JBS comments)
Setting "self.opaque = FALSE;” in initWithJavaLayer() method of MTLLayer.m solves JDK-8243547.
This also solves the open issues that we have regarding shaped windows - JDK-8240164 <https://bugs.openjdk.java.net/browse/JDK-8240164> & JDK-8240074 <https://bugs.openjdk.java.net/browse/JDK-8240074>
I am certain that we need to make our MTLLayer transparent, but this change results in visual regressions in text and image rendering.
Image rendering regression recovers on window refresh, but text seems to have more impact of this change.
We need to adjust our fragment shaders to adapt to this change. I am working on it, but I need some input from you as well -
Do you agree on making MTLLayer transparent? If yes, I need suggestion on fixing the shaders.
More information about the lanai-dev