gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob ./Makefile org/nongnu/libvob/AbstractUpd...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob ./Makefile org/nongnu/libvob/AbstractUpd...
Date: Tue, 22 Jul 2003 08:01:51 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/07/22 08:01:51

Modified files:
        .              : Makefile 
        org/nongnu/libvob: AbstractUpdateManager.java 
        org/nongnu/libvob/gl: GL.java 
        org/nongnu/libvob/impl/gl: GLUpdateManager.java 
        src/jni        : Main.cxx 
        src/main       : Renderer.cxx 
        src/os         : Os-GLX.cxx 
Added files:
        .              : runusertest.py 
        vob/putil      : usertest.py usertestutil.py 

Log message:
        The rest of the changes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/runusertest.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/Makefile.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/AbstractUpdateManager.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/gl/GL.java.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/impl/gl/GLUpdateManager.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Main.cxx.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/main/Renderer.cxx.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/os/Os-GLX.cxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/usertest.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/usertestutil.py?rev=1.1

Patches:
Index: libvob/Makefile
diff -u libvob/Makefile:1.42 libvob/Makefile:1.43
--- libvob/Makefile:1.42        Mon Jun 16 12:16:29 2003
+++ libvob/Makefile     Tue Jul 22 08:01:49 2003
@@ -44,7 +44,7 @@
  JYTHONPATH=.:$(VOB_DEPENDS)/jythonlib.jar:$(VOB_DEPENDS)/pythonlib.jar
 endif
 
-JAVA ?= java
+JAVA ?= java -Xincgc -Xnoclassgc
 
 ifeq (,$(JYTHON))
 # python.verbose can be: "error", "warning", "message", "comment", "debug"
@@ -101,6 +101,9 @@
 
 rundemo::
        $(GLLIB) $(JYTHON) rundemo.py $(DBG) $(DEMO)
+
+runusertest::
+       $(GLLIB) $(JYTHON) runusertest.py $(DBG) $(TEST)
 
 copyrighted::
        python ../fenfire/metacode/copyrighter.py Libvob
Index: libvob/org/nongnu/libvob/AbstractUpdateManager.java
diff -u libvob/org/nongnu/libvob/AbstractUpdateManager.java:1.4 
libvob/org/nongnu/libvob/AbstractUpdateManager.java:1.5
--- libvob/org/nongnu/libvob/AbstractUpdateManager.java:1.4     Wed Apr  9 
10:09:25 2003
+++ libvob/org/nongnu/libvob/AbstractUpdateManager.java Tue Jul 22 08:01:50 2003
@@ -44,9 +44,10 @@
  */
 
 public abstract class AbstractUpdateManager implements Runnable {
-public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.4 
2003/04/09 14:09:25 tjl Exp $";
+public static final String rcsid = "$Id: AbstractUpdateManager.java,v 1.5 
2003/07/22 12:01:50 tjl Exp $";
     public static boolean dbg = false;
-    private static void pa(String s) { System.err.println(s); }
+    private static void pa(String s) { 
+       System.err.println("AbstractUpdateManager: "+s); }
 
     protected static AbstractUpdateManager instance = null;
     protected static void setInstance(AbstractUpdateManager in) {
@@ -391,7 +392,16 @@
      * Used mainly from tests.
      */
     static public boolean tickIdle() {
+       if(dbg) pa("TickIdle");
+       if(instance.handleEvents(false)) {
+           if(dbg) pa("TickIdle: HandleEvents true");
+           return true;
+       }
        return instance.doIdle();
+    }
+
+    static public boolean waitEvent() {
+       return instance.handleEvents(true);
     }
 
     public void run() {
Index: libvob/org/nongnu/libvob/gl/GL.java
diff -u libvob/org/nongnu/libvob/gl/GL.java:1.20 
libvob/org/nongnu/libvob/gl/GL.java:1.21
--- libvob/org/nongnu/libvob/gl/GL.java:1.20    Sat Jun 28 10:35:39 2003
+++ libvob/org/nongnu/libvob/gl/GL.java Tue Jul 22 08:01:50 2003
@@ -945,8 +945,9 @@
      * @param wait If false, this function will return once there are no more
      *                 native events to process. If true, this function will 
wait
      *                 for the next native event.
+     * @return Whether something happened
      */
-    public static native void eventLoop(boolean wait);
+    public static native boolean eventLoop(boolean wait);
     /** Interrupt the event loop. 
      * Unlike most functions in GL, this can be called from other threads
      * to interrup a waiting event loop at any time.
Index: libvob/org/nongnu/libvob/impl/gl/GLUpdateManager.java
diff -u libvob/org/nongnu/libvob/impl/gl/GLUpdateManager.java:1.3 
libvob/org/nongnu/libvob/impl/gl/GLUpdateManager.java:1.4
--- libvob/org/nongnu/libvob/impl/gl/GLUpdateManager.java:1.3   Wed Apr  9 
10:09:26 2003
+++ libvob/org/nongnu/libvob/impl/gl/GLUpdateManager.java       Tue Jul 22 
08:01:50 2003
@@ -36,9 +36,9 @@
 
 
 public class GLUpdateManager extends AbstractUpdateManager {
-public static final String rcsid = "$Id: GLUpdateManager.java,v 1.3 2003/04/09 
14:09:26 tjl Exp $";
+public static final String rcsid = "$Id: GLUpdateManager.java,v 1.4 2003/07/22 
12:01:50 tjl Exp $";
     public static boolean dbg = false;
-    private static void pa(String s) { System.out.println(s); }
+    private static void pa(String s) { System.out.println("GLUpdateManager: 
"+s); }
 
     // can be switched from jython..
     public static boolean demoMode = false;
@@ -57,8 +57,7 @@
 
     protected boolean handleEvents(boolean waitForEvent) {
        if(dbg) pa("HandleEvents "+waitForEvent);
-       GL.eventLoop(waitForEvent);
-       return true;
+       return GL.eventLoop(waitForEvent);
     }
 
     /* for demo-events at the end of doIdle() */
@@ -87,8 +86,12 @@
             }
         }
 
-       if(super.doIdle()) return true;
+       if(super.doIdle()) {
+           if(dbg) pa("super.doIdle true");
+           return true;
+       }
        GL.freeQueue();
+       if(dbg) pa("doIdle false");
        return false;
     }
 
Index: libvob/src/jni/Main.cxx
diff -u libvob/src/jni/Main.cxx:1.18 libvob/src/jni/Main.cxx:1.19
--- libvob/src/jni/Main.cxx:1.18        Sat Jun 28 10:35:39 2003
+++ libvob/src/jni/Main.cxx     Tue Jul 22 08:01:50 2003
@@ -950,11 +950,11 @@
 }
 
 
-jf( void , eventLoop)
+jf( jboolean , eventLoop)
   (JNIEnv *env, jclass, jboolean wait) {
-      DBG(dbg) << "Going into eventloop in C++\n";
+       DBG(dbg) << "Going into eventloop in C++\n";
        jnienv_eventloop = env;
-         ws->eventLoop(wait);
+       return ws->eventLoop(wait);
   }
 
 jf( void , interruptEventloop )
Index: libvob/src/main/Renderer.cxx
diff -u libvob/src/main/Renderer.cxx:1.9 libvob/src/main/Renderer.cxx:1.10
--- libvob/src/main/Renderer.cxx:1.9    Wed Jun 11 13:41:56 2003
+++ libvob/src/main/Renderer.cxx        Tue Jul 22 08:01:50 2003
@@ -42,6 +42,7 @@
     namespace Vobs {
        DBGVAR(dbg_irregularquad, "IrregularQuad");
        DBGVAR(dbg_vfillets, "VFillets");
+       DBGVAR(dbg_calllist, "Calllist");
 
        std::string testStateRetainCorrect;
     }
Index: libvob/src/os/Os-GLX.cxx
diff -u libvob/src/os/Os-GLX.cxx:1.6 libvob/src/os/Os-GLX.cxx:1.7
--- libvob/src/os/Os-GLX.cxx:1.6        Fri Jun 27 04:17:36 2003
+++ libvob/src/os/Os-GLX.cxx    Tue Jul 22 08:01:51 2003
@@ -291,7 +291,7 @@
 
 
        void interrupt();
-       void eventLoop(bool wait);
+       bool eventLoop(bool wait);
 
        /*
        void addIdle(IdleTasks *task) {
@@ -677,8 +677,9 @@
        write(interruptPipe[1], &intr, 1);
     }
 
-    void LXWindowSystem::eventLoop(bool wait) {
+    bool LXWindowSystem::eventLoop(bool wait) {
        DBG(dbg) << "In C++ eventloop : "<<wait<<"\n";
+       bool ret = false;
        // We don't want to block;
        while(1) {
            DBG(dbg) << "Start loop\n";
@@ -686,7 +687,7 @@
            bool eventsWaiting = XEventsQueued(dpy, QueuedAfterFlush);
 
            // If we should not wait and there are no events, return now
-           if(!wait && !eventsWaiting) return;
+           if(!wait && !eventsWaiting) return ret;
            // We only wait once: on the next iteration of the loop,
            // we'll return
            wait = false;
@@ -710,7 +711,7 @@
                            LXWindow *w = windowsByX[timeouts[i].window];
                            timeouts.erase(timeouts.begin()+i);
                            w->deliverTimeout(id);
-                           return;
+                           return ret;
                        } else {
                            int ms = timeouts[i].time - t;
                            if(ms < timeout.tv_usec / 1000)
@@ -734,6 +735,7 @@
 
            XEvent e;
            XNextEvent(dpy, &e);
+           ret = true;
            //cout << "getWindow\n";
            LXWindow *w = windowsByX[e.xkey.window];
            if(!w) {




reply via email to

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