mpv_gl: add GL pre-warm debug log in ensure_gl_init
Logs when GL render context is actually initialized (not on the no-op path). Confirms GL init fires once per widget lifetime, not on every video click. Kept permanently for future debugging.
This commit is contained in:
parent
d9830d0f68
commit
19423776bc
@ -2,12 +2,16 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtOpenGLWidgets import QOpenGLWidget as _QOpenGLWidget
|
||||
from PySide6.QtWidgets import QWidget, QVBoxLayout
|
||||
|
||||
import mpv as mpvlib
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class _MpvGLWidget(QWidget):
|
||||
"""OpenGL widget that hosts mpv rendering via the render API.
|
||||
@ -136,6 +140,7 @@ class _MpvGLWidget(QWidget):
|
||||
but mpv needs a render context before loadfile().
|
||||
"""
|
||||
if not self._gl_inited:
|
||||
log.debug("GL render context init (first-time for widget %s)", id(self))
|
||||
self._gl.makeCurrent()
|
||||
self._init_gl()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user