summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index e8d8bb44f4..659f9f84ce 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -86,7 +86,7 @@ class CocoaCB: NSObject {
} else {
layer.setVideo(true)
updateWindowSize()
- layer.neededFlips += 1
+ layer.update()
}
}
@@ -150,7 +150,7 @@ class CocoaCB: NSObject {
flagsOut: UnsafeMutablePointer<CVOptionFlags>,
displayLinkContext: UnsafeMutableRawPointer?) -> CVReturn in
let ccb: CocoaCB = MPVHelper.bridge(ptr: displayLinkContext!)
- ccb.layer.reportFlip()
+ ccb.mpv.reportRenderFlip()
return kCVReturnSuccess
}
@@ -160,7 +160,7 @@ class CocoaCB: NSObject {
CVDisplayLinkSetCurrentCGDisplay(link!, displayId)
if #available(macOS 10.12, *) {
CVDisplayLinkSetOutputHandler(link!) { link, now, out, inFlags, outFlags -> CVReturn in
- self.layer.reportFlip()
+ self.mpv.reportRenderFlip()
return kCVReturnSuccess
}
} else {
@@ -454,6 +454,7 @@ class CocoaCB: NSObject {
func shutdown(_ destroy: Bool = false) {
setCursorVisiblility(true)
+ layer.setVideo(false)
stopDisplaylink()
uninitLightSensor()
removeDisplayReconfigureObserver()