On Thu, 9 Sep 2021 00:12:31 GMT, Alexey Ushakov <[email protected]> wrote:

> I did some more investigation and the answer is no, it's not a performance 
> issue. The problem is that we never set the opacity to the platform window on 
> IDEA tooltip appearance because of caching code in LWWindowPeer.setOpaque() 
> that is called from LWWindowPeer.initializeImpl. So, I think that a direct 
> setting in the place that I've suggested is necessary.

There is no caching in the LWWindowPeer.setOpaque() it just do not call the 
updateOpaque() if the opaque property did not change. What you are want to do 
is to call the `CWrapper.NSWindow.setBackgroundColor` from the 
LWWindowPeer.setBackground(). So the native color will be in sync with the 
peer's color. That method actually was added as part of JDK-8033786 and removed 
in JDK-8253977.

I think that the root cause is in the performance, because the first thing we 
draw is the surface data which is initialized/filled by the background color. 
Probably in OGL it works fine because we draw mostly immediately, and in case 
of metal we are waiting for DisplayLink callback?

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

PR: https://git.openjdk.java.net/jdk/pull/5373

Reply via email to