fenfire-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ff-cvs] libvob include/vob/trans/LinearPrimitives.hxx o...


From: Tuomas J. Lukka
Subject: [ff-cvs] libvob include/vob/trans/LinearPrimitives.hxx o...
Date: Wed, 10 Sep 2003 08:48:43 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/09/10 08:48:43

Modified files:
        include/vob/trans: LinearPrimitives.hxx 
        org/nongnu/libvob: AbstractUpdateManager.java 
        org/nongnu/libvob/util: ThreadBackground.java 
        org/nongnu/libvob/vobs: ContinuousLineVob.java 
        vob/putil      : demo.py 

Log message:
        Arch commit: REALLY BIG PERFORMANCE BUG FIXES, use lifo

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/trans/LinearPrimitives.hxx.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/AbstractUpdateManager.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/util/ThreadBackground.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/vobs/ContinuousLineVob.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/demo.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: libvob/include/vob/trans/LinearPrimitives.hxx
diff -u libvob/include/vob/trans/LinearPrimitives.hxx:1.8 
libvob/include/vob/trans/LinearPrimitives.hxx:1.9
--- libvob/include/vob/trans/LinearPrimitives.hxx:1.8   Sat Aug  9 09:28:35 2003
+++ libvob/include/vob/trans/LinearPrimitives.hxx       Wed Sep 10 08:48:42 2003
@@ -748,7 +748,7 @@
        }
     };
 
-    VOB_PRIMITIVETRANS_DEFINED(UnitSqBox, "unitSqBox");
+    VOB_PRIMITIVETRANS_DEFINED(UnitSqBox, "unitSq");
 
 
 }
Index: libvob/org/nongnu/libvob/AbstractUpdateManager.java
diff -u libvob/org/nongnu/libvob/AbstractUpdateManager.java:1.9 
libvob/org/nongnu/libvob/AbstractUpdateManager.java:1.10
--- libvob/org/nongnu/libvob/AbstractUpdateManager.java:1.9     Sun Sep  7 
08:20:22 2003
+++ libvob/org/nongnu/libvob/AbstractUpdateManager.java Wed Sep 10 08:48:42 2003
@@ -49,7 +49,7 @@
  */
 
 public abstract class AbstractUpdateManager implements Runnable, 
org.nongnu.libvob.util.Background {
-public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.9 
2003/09/07 12:20:22 tjl Exp $";
+public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.10 
2003/09/10 12:48:42 tjl Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { 
        System.err.println("AbstractUpdateManager: "+s); }
@@ -358,10 +358,7 @@
      */
     protected abstract boolean handleEvents(boolean waitForEvent);
 
-    // XXX Should use Lifo but Fenfire code is not yet ready 
-    // for that
-    // static private PriorityQueue queue = new LifoPriorityQueue();
-    static private PriorityQueue queue = new DumbPriorityQueue();
+    static private PriorityQueue queue = new LifoPriorityQueue();
 
     /** Run a given task in the main thread at some point
      * in the future.
Index: libvob/org/nongnu/libvob/util/ThreadBackground.java
diff -u libvob/org/nongnu/libvob/util/ThreadBackground.java:1.3 
libvob/org/nongnu/libvob/util/ThreadBackground.java:1.4
--- libvob/org/nongnu/libvob/util/ThreadBackground.java:1.3     Tue Sep  9 
08:13:20 2003
+++ libvob/org/nongnu/libvob/util/ThreadBackground.java Wed Sep 10 08:48:42 2003
@@ -38,10 +38,7 @@
     public static boolean dbg = false;
     final static void pa(String s) { System.out.println(s); }
 
-    // XXX Should use Lifo but Fenfire code is not yet ready 
-    // for that
-    // private PriorityQueue queue = new LifoPriorityQueue();
-    private PriorityQueue queue = new DumbPriorityQueue();
+    private PriorityQueue queue = new LifoPriorityQueue();
 
     public void addTask(Runnable r, float priority) {
        synchronized(queue) {
Index: libvob/org/nongnu/libvob/vobs/ContinuousLineVob.java
diff -u libvob/org/nongnu/libvob/vobs/ContinuousLineVob.java:1.8 
libvob/org/nongnu/libvob/vobs/ContinuousLineVob.java:1.9
--- libvob/org/nongnu/libvob/vobs/ContinuousLineVob.java:1.8    Mon Aug 25 
15:56:51 2003
+++ libvob/org/nongnu/libvob/vobs/ContinuousLineVob.java        Wed Sep 10 
08:48:43 2003
@@ -36,19 +36,17 @@
 /** Continuous line needs x,y,z points in float array.
  */
 public class ContinuousLineVob extends AbstractVob {
-public static final String rcsid = "$Id: ContinuousLineVob.java,v 1.8 
2003/08/25 19:56:51 mudyc Exp $";
+public static final String rcsid = "$Id: ContinuousLineVob.java,v 1.9 
2003/09/10 12:48:43 tjl Exp $";
     static private void pa(String s) { 
System.out.println("ContinuousLineVob::"+s); }
     public static boolean dbg = false;
 
     static private GL.Texture tex;
-    static private boolean needInit = true;
     static private void loadTex() {
-       if (needInit) {
+       if (tex == null) {
            String[] texparam = new String[0];
            tex = GL.createTexture(); 
            //tex.shade_all_levels(256, 256, 0, 1, "ALPHA", "ALPHA", "line", 
texparam);
            tex.shade(128, 128, 0, 1, "ALPHA", "ALPHA", "line", texparam);
-           needInit = false;
        }
     }
 
@@ -106,8 +104,16 @@
 
     // GL implementation
     // =================
-    static float[] tmp_floats = new float[3];
+
+    private Vob initVob;
+    private Vob lineVob;
+    private Vob finishVob;
+
     public int putGL(VobScene vs, int coordsys1) { 
+       /*
+        * Mudyc's original implementation.
+        * Left in here until he reads this and the corrected implementation 
and understands
+        * what was wrong.
        if (needInit) loadTex();
 
        vs.map.put(GLCache.getCallList(
@@ -120,5 +126,25 @@
        vs.map.put(cl, coordsys1);
        vs.map.put(GLCache.getCallList("PopAttrib"));
        return  0;
+       */
+       if (tex == null) loadTex();
+       if(initVob == null) {
+           initVob = GLCache.getCallList(
+               "PushAttrib ENABLE_BIT \n"+
+               "Color "+ ColorUtil.colorGLString(color)
+               );
+           if (dbg) pa("tex:"+tex+", w:"+width+", jS:"+joinStyle+", 
chain:"+chain+", points"+points);
+           lineVob = 
+               GLRen.createContinuousLine(tex.getTexId(), width, joinStyle, 
chain, points);
+           finishVob = GLCache.getCallList("PopAttrib");
+       }
+
+       vs.map.put(initVob);
+       vs.map.put(lineVob, coordsys1);
+       vs.map.put(finishVob);
+       return  0;
+
     }
 }
+
+
Index: libvob/vob/putil/demo.py
diff -u libvob/vob/putil/demo.py:1.22 libvob/vob/putil/demo.py:1.23
--- libvob/vob/putil/demo.py:1.22       Thu Aug 28 20:00:24 2003
+++ libvob/vob/putil/demo.py    Wed Sep 10 08:48:43 2003
@@ -169,10 +169,8 @@
        print "ERROR WHILE LOADING"
        t.printStackTrace()
     except:
-       typ, val, tra = sys.exc_info()
-       l = traceback.format_list(traceback.extract_tb(tra))
-
-       print "ERROR WHILE LOADING! %s\n%s\n"%(str(typ),str(val)), l
+       print "ERROR WHILE LOADING"
+       traceback.print_exc()
 
 class GlobalScene:
     def key(self, k):




reply via email to

[Prev in Thread] Current Thread [Next in Thread]