[vlc-commits] [Git][videolan/vlc][master] qt/CompositorDComp: early call render on resize
    Hugo Beauzée-Luyssen (@chouquette) 
    gitlab at videolan.org
       
    Fri Feb  4 10:04:16 UTC 2022
    
    
  
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
15ec6fd3 by Prince Gupta at 2022-02-04T09:45:48+00:00
qt/CompositorDComp: early call render on resize
on window resize, it seems that qt event loop is overwhelmed with resize
events, making timer event of requestUpdate called very late, that
causes delays in rendering
manually call render to avoid out of sync window painting
ref #25572
- - - - -
2 changed files:
- modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
- modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
Changes:
=====================================
modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
=====================================
@@ -566,6 +566,13 @@ void CompositorDCompositionUISurface::render()
     }
 }
 
+void CompositorDCompositionUISurface::forceRender()
+{
+    m_renderPending = false;
+    m_renderTimer.stop();
+    render();
+}
+
 void CompositorDCompositionUISurface::timerEvent(QTimerEvent *event)
 {
     if (!event)
@@ -615,6 +622,7 @@ bool CompositorDCompositionUISurface::eventFilter(QObject* object, QEvent* event
 
     case QEvent::Resize:
         updateSizes();
+        forceRender();
         break;
 
     case QEvent::WindowActivate:
=====================================
modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
=====================================
@@ -111,6 +111,7 @@ private:
 
     void requestUpdate();
     void render();
+    void forceRender();
 
     void handleScreenChange();
 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/15ec6fd302b7a713206b644832878f99b0572414
-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/15ec6fd302b7a713206b644832878f99b0572414
You're receiving this email because of your account on code.videolan.org.
    
    
More information about the vlc-commits
mailing list