summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-10-14 21:26:43 +0200
committerSven Gothel <[email protected]>2010-10-14 21:26:43 +0200
commit774138544e1eec3330309ad682fa05154a07ab8d (patch)
treea9d612e98f1d16390763f54ab1888ff66f081a22 /make
parentd7faeb8b96f5aba76967096006af4c420d964fef (diff)
JOGL: Reenable Applet/Webstart/RCP support for JOGL + AWT + X11
Changed GLProfile/NativeWindowFactory/.. initialization methodology: GLProfile: public static synchronized void initSingleton(final boolean firstUIActionOnProcess); NativeWindowFactory: public static synchronized void initSingleton(final boolean firstUIActionOnProcess); +++ Introducing NativeWindow ToolkitLock, implementations are NullToolkitLock JAWTToolkitLock X11JAWTToolkitLock X11ToolkitLock AbstractGraphicsDevice provides generic global toolkit locking methods, implemented by the ToolkitLock interface. ToolkitLock's are aggregated in NativeWindow's DefaultGraphicsDevice to implement it's superclass lock()/unlock() methods. This enables a device specific locking strategy, ie on X11/AWT utilizing JAWT && X11 locking, and maybe none for others (NEWT). No locking is required for X11 / AWT, in case the above mentioned initialization happened as a 'firstUIActionOnProcess'. The ToolkitLock factory is currently a hardcoded part of NativeWindowFactory. We may have to allow 3rd party NativeWindow implementations to register custom ones. +++ com.jogamp.opengl.impl.GLDrawableImpl cleanup: Dealing with all locking code, providing all public methods. Exceptions are commented. Specializations x11/windows/.. only contains platform code. Pulled down access qualifiers if possible public -> protected. com.jogamp.nativewindow.impl.x11.X11Util Wrapping all X11Lib method with the new locking code. com.jogamp.nativewindow.impl.jawt.JAWTUtil Utilize global SunToolkit.awtLock() is available, the fallback to global JAWT.lock(). The latter just invokes the first. javax.media.nativewindow.awt.AWTGraphicsDevice setHandle(long handle) -> setSubType(String type, long handle) which also resets the ToolkitLock respecting the new type. This ensures correct locking after the sub type has been determined, ie AWT using an X11 peer. +++ Misc Changes done on the way .. GLCanvas: Fixed inversed this.drawableHelper.isExternalAnimatorAnimating() condition, which disabled normal repaint. GLJPanel: Removed drawableHelper.isExternalAnimatorAnimating() condition, which disabled painting, since the animation thread just updates the source image. NEWT WindowImpl: When reparenting back to parent and 'refit' child if it's size exceeds it's parent. More 'Fix: Memory consumption' commit 6ced17f0325d5719e992b246ffd156e5b39694b4. NEWTEvent: Removed code to evaluate the 'system event' attribute, need to find a better approach.
Diffstat (limited to 'make')
-rw-r--r--make/build-junit.xml11
-rw-r--r--make/config/nativewindow/x11-CustomJavaCode.java3
-rwxr-xr-xmake/scripts/java-run-all.sh6
-rwxr-xr-xmake/scripts/java-win64-dbg.bat4
-rwxr-xr-xmake/scripts/make.jogl.all.linux-x86_64.sh1
-rw-r--r--make/scripts/tests.bat23
-rwxr-xr-xmake/scripts/tests.sh12
7 files changed, 36 insertions, 24 deletions
diff --git a/make/build-junit.xml b/make/build-junit.xml
index 5a785a95d..44a0a7866 100644
--- a/make/build-junit.xml
+++ b/make/build-junit.xml
@@ -99,9 +99,12 @@
<condition property="jvmarg.newt" value="-Djava.awt.headless=true"><not><isset property="isOSX"/></not></condition>
<!-- Test*CORE* -->
- <junit forkmode="once" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
+ <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
<env key="${system.env.library.path}" path="${obj.all.paths}"/>
<jvmarg value="-Djava.library.path=${obj.all.paths}"/>
+ <!--
+ <jvmarg value="-Dnewt.debug.EDT"/>
+ -->
<formatter usefile="false" type="plain"/>
<formatter usefile="true" type="xml"/>
@@ -153,6 +156,9 @@
<env key="CLASSPATH" value="${junit_jogl_newt.run.jars}"/>
<arg value="-Djava.library.path=${obj.all.paths}"/>
<arg line="${jvmarg.newt}"/>
+ <!--
+ <arg line="-Dnewt.debug.EDT"/>
+ -->
<arg line="com.jogamp.newt.util.MainThread"/>
<arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/>
<srcfile/>
@@ -174,11 +180,12 @@
</for>
<!-- Test*AWT* -->
- <junit forkmode="once" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
+ <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
<env key="${system.env.library.path}" path="${obj.all.paths}"/>
<jvmarg value="-Djava.library.path=${obj.all.paths}"/>
<!--
+ <jvmarg value="-Dnewt.debug.EDT"/>
<jvmarg value="-Djogl.debug=all"/>
<jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
<jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java
index 41f726916..5afa86737 100644
--- a/make/config/nativewindow/x11-CustomJavaCode.java
+++ b/make/config/nativewindow/x11-CustomJavaCode.java
@@ -1,6 +1,3 @@
- static {
- X11Util.initSingleton(); // ensure it's loaded and setup
- }
/** Interface to C language function: <br> <code> XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code> */
public static XVisualInfo[] XGetVisualInfo(long arg0, long arg1, XVisualInfo arg2, int[] arg3, int arg3_offset)
diff --git a/make/scripts/java-run-all.sh b/make/scripts/java-run-all.sh
index 8ece23a48..d28c0953c 100755
--- a/make/scripts/java-run-all.sh
+++ b/make/scripts/java-run-all.sh
@@ -43,12 +43,14 @@ uname -a | grep -i Darwin && MOSX=1
# D_ARGS="-Dnativewindow.debug.X11Util=true"
# D_ARGS="-Dnewt.debug=all -Dnativewindow.debug=all"
# D_ARGS="-Djogl.debug=all -Dnewt.debug=all -Dnativewindow.debug=all"
+# D_ARGS="-Dnewt.debug=all -Dnativewindow.debug=all -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
+# D_ARGS="-Dnewt.debug=all -Dnativewindow.debug=all -Djogamp.common.utils.locks.Lock.timeout=600000"
# D_ARGS="-Dnewt.debug=all"
# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT"
# D_ARGS="-Dnewt.debug.EDT -Dnewt.debug.Window"
# D_ARGS="-Dsun.awt.disableMixing=true -Dnewt.debug.EDT"
-# D_ARGS="-Dnewt.debug.EDT"
-# D_ARGS="-Dnativewindow.debug.TraceLock"
+D_ARGS="-Dnewt.debug.EDT -Dnativewindow.TraceLock"
+# D_ARGS="-Djogamp.debug.TraceLock"
# D_ARGS="-Dnewt.debug.Display"
# D_ARGS="-Djogl.debug.Animator -Dnewt.debug.Window -Dnewt.debug.Display"
# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.test.Window.reparent.incompatible=true"
diff --git a/make/scripts/java-win64-dbg.bat b/make/scripts/java-win64-dbg.bat
index edd729c14..87cc15943 100755
--- a/make/scripts/java-win64-dbg.bat
+++ b/make/scripts/java-win64-dbg.bat
@@ -14,10 +14,10 @@ set CP_ALL=.;%BLD_DIR%\jogl\jogl.all.jar;%BLD_DIR%\nativewindow\nativewindow.all
echo CP_ALL %CP_ALL%
REM set D_ARGS="-Djogamp.debug.JNILibLoader=true" "-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true" "-Djogl.debug.GLProfile=true"
-REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all"
+set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.Lock" "-Djogamp.debug.Lock.TraceLock"
REM set D_ARGS="-Dnewt.debug.Window" "-Dnativewindow.debug.TraceLock"
REM set D_ARGS="-Dnativewindow.debug.TraceLock"
-set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display"
+REM set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display"
REM set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display" "-Dnewt.test.Window.reparent.incompatible=true"
set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
diff --git a/make/scripts/make.jogl.all.linux-x86_64.sh b/make/scripts/make.jogl.all.linux-x86_64.sh
index cc7b97ef7..f038c0f71 100755
--- a/make/scripts/make.jogl.all.linux-x86_64.sh
+++ b/make/scripts/make.jogl.all.linux-x86_64.sh
@@ -55,6 +55,7 @@ echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $LOGF
ant \
$CUSTOMLIBDIR \
-Dbuild.noarchives=true \
+ -Dc.compiler.debug=true \
-Djogl.cg=1 \
-Drootrel.build=build-x86_64 \
-DuseKD=true \
diff --git a/make/scripts/tests.bat b/make/scripts/tests.bat
index 453633ec0..2c5739165 100644
--- a/make/scripts/tests.bat
+++ b/make/scripts/tests.bat
@@ -1,19 +1,18 @@
-REM #com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsNEWT -time 30000
-REM #com.jogamp.test.junit.jogl.acore.TestGLProfile01CORE
-REM #com.jogamp.test.junit.newt.TestParenting01AWT
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsNEWT -time 30000
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.jogl.acore.TestGLProfile01CORE
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestParenting01AWT
-REM # ./scripts/java-run-all.sh ../build-x86_64
-
-REM # ./scripts/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cAWT -time 50000
-REM # ./scripts/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestDisplayLifecycle01NEWT
-REM # ./scripts/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestListenerCom01AWT
-REM # ./scripts/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01NEWT
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.parenting.TestParenting01cAWT -time 50000
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestDisplayLifecycle01NEWT
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestListenerCom01AWT
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.parenting.TestParenting01NEWT
-REM # ./scripts/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestGLWindows01NEWT
-REM # ./scripts/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestGLWindows02NEWTAnimated
+scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestGLWindows01NEWT
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestGLWindows02NEWTAnimated
REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.parenting.TestParenting01NEWT
REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot
REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.TestFocus01SwingAWTRobot
REM scripts\java-win64-dbg.bat com.jogamp.test.junit.nativewindow.TestRecursiveToolkitLockCORE
+REM scripts\java-win64-dbg.bat com.jogamp.test.junit.newt.parenting.TestParenting03AWT
-scripts\java-win32.bat com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot
+REM scripts\java-win32.bat com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 15c6821a0..adaaafff0 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -4,17 +4,20 @@ rm -f java-run.log
spath=`dirname $0`
-#com.jogamp.test.junit.jogl.acore.TestGLProfile01CORE
#com.jogamp.test.junit.newt.TestParenting01AWT
+# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.acore.TestGLProfile01NEWT $*
+
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsNEWT $*
+# $spath/java-run-all.sh ../build-x86_64 -Djava.awt.headless=true com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsNEWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestDisplayLifecycle01NEWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestListenerCom01AWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestGLWindows01NEWT $*
+# $spath/java-run-all.sh ../build-x86_64 -Djava.awt.headless=true com.jogamp.test.junit.newt.TestGLWindows01NEWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestGLWindows02NEWTAnimated $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.offscreen.TestOffscreen01NEWT $*
@@ -26,12 +29,15 @@ spath=`dirname $0`
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01bAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cSwingAWT $*
-# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting02AWT $*
+$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting02AWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting03AWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.awt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $*
+# $spath/java-run-all.sh ../build-x86_64 -Dnativewindow.TraceLock=true com.jogamp.test.junit.jogl.awt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus01SwingAWTRobot $*
-$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot $*
+# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot $*
+
+$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestEventSourceNotAWTBug $*
$spath/count-edt-start.sh java-run.log