RFR: 8273355: Lanai: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1

Sergey Bylokhov serb at openjdk.java.net
Thu Sep 9 05:37:57 UTC 2021


On Thu, 9 Sep 2021 00:12:31 GMT, Alexey Ushakov <avu at openjdk.org> 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



More information about the client-libs-dev mailing list