RFR: 8304825: MacOS metal pipeline - window isn't painted if created during display sleep

Phil Race prr at openjdk.org
Fri Apr 7 04:39:49 UTC 2023


On Thu, 6 Apr 2023 14:16:46 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:

> Root cause : The CVDisplayLink used in MTLLayer stops invoking callbacks on screen sleep and wakeup event. It is found that stop and restart of CVDisplayLink on these events also does not help.
> 
> Fix : Recreate the CVDisplayLink on screen sleep and wakeup event.

src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 102:

> 100: 
> 101:     [self stopDisplayLink];
> 102: }

I'm assuming this is something we should have done already to save wasted work ?
i.e if the screen is asleep, we don't need to be connected to it and updating windows ?
But I see the same stopDisplayLink call in the wakeup code ... any issues with the extra call there ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13375#discussion_r1160429562



More information about the client-libs-dev mailing list