mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
The macOS CAOpenGLLayer is pull-based: after the shared render view is re-parented into a reopened player window, a single forced repaint is issued. draw() consumed the forceDraw flag before validating the viewport, so when that repaint landed while the layer was still 0x0 (the expanded window builds its content a runloop late), the request was swallowed. With mpv paused during load, nothing repainted again, leaving the video permanently black with working audio. - Validate viewport/framebuffer in draw() before consuming flags; on failure keep the forced draw armed and retry (bounded, 5x50ms) - Repaint from setFrameSize on the first non-zero layout while a forced draw is still pending - Drop the stale fbo=1 fallback; render only into the validated live framebuffer binding - clearToBlack: take the CGL lock and skip glClear when no framebuffer is bound - clearing FBO 0 on this core-profile context latched GL_INVALID_FRAMEBUFFER_OPERATION, which libmpv reported on every load - Add diagnostics for dropped draws and the first-frame render