changeset 21924:422eef67d14a

speeds up mplayer execution by over FIVE times when all of the of the following apply: * menus are enabled * menus are enabled but not displayed * direct rendering is in use Patch by Adam Sulmicki % adam A cfar P umd P edu % Original thread: date: Jan 7, 2007 11:07 PM subject: [MPlayer-dev-eng] [PATCH] slow menus : try two Other threads: date: Jan 7, 2007 12:39 PM subject: [MPlayer-advusers] [patch] slow menus Also: date: Jan 6, 2007 11:13 PM subject: [MPlayer-advusers] [patch] slow menus And: date: Jan 2, 2007 11:46 PM subject: [MPlayer-advusers] slow down with menu off Finaly: date: Dec 24, 2006 11:25 AM subject: [MPlayer-users] slow down with menu off
author gpoirier
date Tue, 16 Jan 2007 13:24:03 +0000
parents 1658f7d97b27
children 1c93736b6751
files AUTHORS libmenu/vf_menu.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Tue Jan 16 09:49:28 2007 +0000
+++ b/AUTHORS	Tue Jan 16 13:24:03 2007 +0000
@@ -1039,6 +1039,9 @@
 Sudrien
     * softgrip
 
+Sulmicki, Adam <adam@cfar.umd.edu>
+   * profiling and menu fixes
+
 Szumiela, Marcin <marcin@szumiela.pl>
     * divxplayer
 
--- a/libmenu/vf_menu.c	Tue Jan 16 09:49:28 2007 +0000
+++ b/libmenu/vf_menu.c	Tue Jan 16 13:24:03 2007 +0000
@@ -233,6 +233,10 @@
   } else {
     if(mp_input_key_cb)
       mp_input_key_cb = NULL;
+
+    if(mpi->flags&MP_IMGFLAG_DIRECT)
+      dmpi = mpi->priv;
+    else {
     dmpi = vf_get_image(vf->next,mpi->imgfmt,
 			MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
 			mpi->w,mpi->h);
@@ -245,6 +249,7 @@
     dmpi->planes[2] = mpi->planes[2];
     dmpi->priv      = mpi->priv;
   }
+  }
   return vf_next_put_image(vf,dmpi, pts);
 }