summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa-cb/window.swift
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-06-12 02:48:31 +0200
committerJan Ekström <jeebjp@gmail.com>2018-11-13 20:43:29 +0200
commit9e466ee6214ed302a6846dd40264cf06eb712b3a (patch)
tree174510e25423da823810d416cb7ceb0392c256b1 /video/out/cocoa-cb/window.swift
parent317d3ac26634d6719c2c70e3e88acbf0c108fd73 (diff)
downloadmpv-9e466ee6214ed302a6846dd40264cf06eb712b3a.tar.bz2
mpv-9e466ee6214ed302a6846dd40264cf06eb712b3a.tar.xz
cocoa-cb: use libmpv's advanced rendering control and timing
this adds support for GPU rendered screenshots, DR (theoretically) and possible other advanced functions in the future that need to be executed from the rendering thread. additionally frames that would be off screen or not be displayed when on screen are being dropped now.
Diffstat (limited to 'video/out/cocoa-cb/window.swift')
-rw-r--r--video/out/cocoa-cb/window.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift
index 34a73f88d1..d11706f38b 100644
--- a/video/out/cocoa-cb/window.swift
+++ b/video/out/cocoa-cb/window.swift
@@ -613,6 +613,12 @@ class Window: NSWindow, NSWindowDelegate {
cocoaCB.updateCusorVisibility()
}
+ func windowDidChangeOcclusionState(_ notification: Notification) {
+ if occlusionState.contains(.visible) {
+ cocoaCB.layer.update(force: true)
+ }
+ }
+
func windowWillMove(_ notification: Notification) {
isMoving = true
}