We use CVDisplayLink in MTLLayer to blit content to the screen.
While working onJDK-8312198 noticed that from macOS 14 many functions under CVDisplayLink are deprecated : https://developer.apple.com/documentation/corevideo/cvdisplaylinkcreatewithactivecgdisplays(_:)?language=objc
We have Metal specific CAMetalDisplayLink which can be used to blit the MTLLayer : https://developer.apple.com/documentation/quartzcore/cametaldisplaylink?language=objc
Also looks like using CADisplayLink/CAMetalDisplyaLink takes care of display sleep and wakeup scenarios : https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-14#Display-Link. So we can remove additional code that we have now to handle such scenarios :JDK-8304825, JDK-8312198.
We need to replace deprecated CVDisplayLink with CAMetalDisplayLink.
This also needs good amount of testing to make sure everything works fine.
While working on
We have Metal specific CAMetalDisplayLink which can be used to blit the MTLLayer : https://developer.apple.com/documentation/quartzcore/cametaldisplaylink?language=objc
Also looks like using CADisplayLink/CAMetalDisplyaLink takes care of display sleep and wakeup scenarios : https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-14#Display-Link. So we can remove additional code that we have now to handle such scenarios :
We need to replace deprecated CVDisplayLink with CAMetalDisplayLink.
This also needs good amount of testing to make sure everything works fine.