[vlc-commits] [Git][videolan/vlc][master] qt: don't reinitialise RenderControl OpenGL context on expose in X11 compositor.

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Feb 5 11:23:46 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
0758d7e5 by Pierre Lamot at 2022-02-05T10:08:55+00:00
qt: don't reinitialise RenderControl OpenGL context on expose in X11 compositor.

re-initialising the context was causing severe performance degradation (hangs,
CPU consumption & RAM) in the snap version (at least) when KDE QuickStyle was
used.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/compositor_x11_uisurface.cpp


Changes:

=====================================
modules/gui/qt/maininterface/compositor_x11_uisurface.cpp
=====================================
@@ -287,10 +287,12 @@ void CompositorX11UISurface::exposeEvent(QExposeEvent *)
 {
     if (isExposed())
     {
-        m_context->makeCurrent(this);
-        m_uiRenderControl->initialize(m_context);
-        m_context->doneCurrent();
-
+        if (!m_uiWindow->openglContext())
+        {
+            m_context->makeCurrent(this);
+            m_uiRenderControl->initialize(m_context);
+            m_context->doneCurrent();
+        }
         requestUpdate();
     }
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0758d7e50255d0efc45d88362457233f78c17d48

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0758d7e50255d0efc45d88362457233f78c17d48
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list