mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 14:56:55 +00:00
cocoa-cb: fix hwdec when drawing off-screen
drawing off-screen failed because we didn't have a valid context. the problem is we force off-screen drawing because the CAOpenGLLayer refuses to draw anything while being off-screen. set the current context before starting to draw anything off-screen. Fixes #5530
This commit is contained in:
parent
b67d2ede67
commit
4a579ad166
@ -198,6 +198,7 @@ class VideoLayer: CAOpenGLLayer {
|
||||
if !cocoaCB.window.occlusionState.contains(.visible) &&
|
||||
neededFlips > 1 && canDrawOffScreen
|
||||
{
|
||||
CGLSetCurrentContext(cglContext!)
|
||||
draw(cglContext!)
|
||||
display()
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user