[xiph-cvs] r6584 - trunk/postfish

xiphmont at xiph.org xiphmont at xiph.org
Tue May 4 21:26:12 PDT 2004



Author: xiphmont
Date: 2004-04-23 17:28:06 -0400 (Fri, 23 Apr 2004)
New Revision: 6584

Modified:
   trunk/postfish/multibar.c
Log:
Take yet more GUI update machinery out of the active path of widgets
that are invisible/unmapped.

<p><p>Modified: trunk/postfish/multibar.c
===================================================================
--- trunk/postfish/multibar.c	2004-04-23 21:24:09 UTC (rev 6583)
+++ trunk/postfish/multibar.c	2004-04-23 21:28:06 UTC (rev 6584)
@@ -57,7 +57,7 @@
 
 
 /* call me roughly 10-20fps */
-static void compute(Multibar *m,float *lowvals, float *highvals, int n){
+static void compute(Multibar *m,float *lowvals, float *highvals, int n, int draw){
   int i,j,xpad;
   GtkWidget *widget=GTK_WIDGET(m);
   float max=-400;
@@ -117,7 +117,7 @@
       m->peakdelta=0;
     }
     
-    {
+    if(draw){
       int *pixhi=alloca(n*sizeof(*pixhi));
       int *pixlo=alloca(n*sizeof(*pixlo));
       
@@ -179,7 +179,6 @@
         m->bartrackers[i].pixeldeltalo=dello;
         
       }
-      
     }
   }
 }
@@ -779,7 +778,7 @@
   gdk_draw_rectangle(m->backing,widget->style->white_gc,1,0,0,widget->allocation.width,
                      widget->allocation.height);
   
-  compute(m,0,0,0);
+  compute(m,0,0,0,1);
   for(i=0;i<m->thumbs;i++)
     m->thumbpixel[i]=val_to_pixel(m,m->thumbval[i]);
   m->thumblo_x=val_to_pixel(m,m->thumblo);
@@ -1129,8 +1128,7 @@
 
 void multibar_set(Multibar *m,float *lo, float *hi, int n, int draw){
   GtkWidget *widget=GTK_WIDGET(m);
-  compute(m,lo,hi,n);
-
+  compute(m,lo,hi,n,draw);
   if(draw)draw_and_expose(widget);
 }
 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list