[vlc-devel] [PATCH 23/42] vout: remove the dummy display pool

Rémi Denis-Courmont remi at remlab.net
Fri Jun 28 20:30:11 CEST 2013


With the previous commit, the vout wrapper's display pool is no longer
used ever if direct rendering is not in use. Removing it saves one
picture buffer.
---
 src/video_output/vout_wrapper.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 8bcb118..68099d9 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -113,16 +113,9 @@ static void NoDrInit(vout_thread_t *vout)
     if (sys->display.use_dr)
         sys->display_pool = vout_display_Pool(sys->display.vd, 3);
     else
-        //sys->display_pool = picture_pool_Reserve(sys->decoder_pool, DISPLAY_PICTURE_COUNT);
-        sys->display_pool = picture_pool_NewFromFormat(&sys->display.vd->source, DISPLAY_PICTURE_COUNT);
+        sys->display_pool = NULL;
 }
-static void NoDrClean(vout_thread_t *vout)
-{
-    vout_thread_sys_t *sys = vout->p;
 
-    if (!sys->display.use_dr)
-        picture_pool_Delete(sys->display_pool);
-}
 int vout_InitWrapper(vout_thread_t *vout)
 {
     vout_thread_sys_t *sys = vout->p;
@@ -176,10 +169,8 @@ void vout_EndWrapper(vout_thread_t *vout)
     if (sys->private_pool)
         picture_pool_Delete(sys->private_pool);
 
-    if (sys->decoder_pool != sys->display_pool) {
-        NoDrClean(vout);
+    if (sys->decoder_pool != sys->display_pool)
         picture_pool_Delete(sys->decoder_pool);
-    }
 }
 
 /*****************************************************************************
@@ -194,8 +185,6 @@ void vout_ManageWrapper(vout_thread_t *vout)
     vout_ManageDisplay(vd, !sys->display.use_dr || reset_display_pool);
 
     if (reset_display_pool) {
-        NoDrClean(vout);
-
         sys->display.use_dr = !vout_IsDisplayFiltered(vd);
         NoDrInit(vout);
     }
-- 
1.8.3.1




More information about the vlc-devel mailing list