On Fri, 23 May 2025 11:38:32 GMT, Jayathirth D V <j...@openjdk.org> wrote:
>> In stress based scenarios it is observed that nothing is drawn in UI content >> when display wakes up from sleep in Metal pipeline of macOS. Unfortunately i >> am not able to reproduce it, but based on details in the bug it looks like >> we are hitting a race condition. Call to >> CVDisplayLinkCreateWithActiveCGDisplays is becoming a no-op as there are no >> active displays right after NSWorkspaceScreensDidWakeNotification. Looks >> like if we continue to call CVDisplayLinkCreateWithActiveCGDisplays after >> screen wakeup we are able to get the list of ActiveDisplays and then able to >> create displayLink. >> >> So now the code is modified to check whether >> CVDisplayLinkCreateWithActiveCGDisplays is successful or not. If not we will >> try to call CVDisplayLinkCreateWithActiveCGDisplays for 5 instances each >> with 1 second delay. There is no regression test for this change because it >> needs a stress based test with display wakeup/sleep(As captured in JBS, i am >> not able to reproduce this issue). >> >> I have tested this change for sanity by running animation examples from >> SwingSet2 and continuously connecting/disconnecting external display. Also >> by multiple display sleep and wakeup scenarios, i don't see any regressions. >> Also whole clientlibs CI run is done with this patch and it is also green. >> >> While working on this bug also noticed that many functions of CVDisplayLink >> is deprecated from macOS 14 and going forward we need to use >> CADisplayLink/CAMetalDisplayLink. I have raised >> [JDK-8357418](https://bugs.openjdk.org/browse/JDK-8357418) for the same. > > Jayathirth D V has updated the pull request incrementally with one additional > commit since the last revision: > > Add macro LGTM ------------- Marked as reviewed by avu (Committer). PR Review: https://git.openjdk.org/jdk/pull/25342#pullrequestreview-2865818213