summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* NEWT: Drop post stop tasks on EDT due to it's recursive nature (DEBUG traces ↵Sven Gothel2010-10-141-10/+20
| | | | them).
* Fix: Memory consumptionSven Gothel2010-10-146-64/+241
| | | | | | | | | | | | | | | | Observing memory consumption showed: 1 - 'traceLock' debug stack traces (GLContextLock) 2 - massive Iterator usage (1) is fixed, ie only enabled in DEBUG mode, like we have done in RecursiveLock before (2) Using an Iterator on ArrayLists with a low element count < 100, as it is usual in our use cases, is observed not to be faster than accessing the elements via an index (-> TestIteratorIndexCORE.java ). On the contrary, the index implementation was a bit faster. Further more, these Iterators were massively used on the fly during animation, hence their memory managment even impacts fluent processing/animation. Recoded all animation related (display, surfaceUpdated, ..) loops using an index.
* Fix: Avoid list modification while iterator in use ↵Sven Gothel2010-10-142-19/+134
| | | | (ConcurrentModificationException) - 2 - Use volatile barrier
* Fix: Avoid list modification while iterator in use ↵Sven Gothel2010-10-141-12/+34
| | | | (ConcurrentModificationException)
* Drop to be enqueued NEWTEvent if EDT is already dead/stopped. Thx Steve for ↵Sven Gothel2010-10-131-0/+8
| | | | the threaddump
* Harmonize all runtime properties, see doc/Implementation/runtime-properties.txtSven Gothel2010-10-1116-18/+93
|
* JOGL: WindowsWGLDrawableFactory/X11GLXDrawableFactory: synchronize ↵Sven Gothel2010-10-093-79/+80
| | | | | | | sharedContext lock/release Unsynchronized lead to an 'context already locked by another thread' exception at initialization time (Windows: in general; X11: ATI and pbuffer drawable).
* NEWT: WindowImpl/GLWindow add zero size fast path; Reparent: Zero size -> ↵Sven Gothel2010-10-096-65/+99
| | | | | | pending creation NEWT/AWT: TestParenting03AWT use Container and add delay in addNotify(2nd-gl-element);
* Relocated RecursiveToolkitLock -> gluegen ; NEWT AWTParentWindowAdapter fix ↵Sven Gothel2010-10-0914-569/+314
| | | | | | | | | | | | | | | | | | & WindowImpl debug change ; Add NEWT/AWT unit test 1 frame - 2 NewtCanvasAWT Relocated RecursiveToolkitLock -> gluegen com.jogamp.nativewindow.impl.RecursiveToolkitLock -> com.jogamp.common.util.RecursiveToolkitLock NEWT AWTParentWindowAdapter fix - minimize action if status unchanged - added missing isValid() condition before runOnEDT.. NEWT WindowImpl: - debug output only if action triggered (resize/visible) Add NEWT/AWT unit test 1 frame - 2 NewtCanvasAWT - Testing case where AWTParentWindowAdapter provokes both GLWindow instances to resize/visible
* Fix RecursiveToolkitLock: Implement complete fair FIFO scheduler ↵Sven Gothel2010-10-091-30/+67
| | | | (wait-interrupt) using a LinkedList
* Fix: JOGL GLContextLock starvation; Tighten NEWT/AWT focus unit testsSven Gothel2010-10-087-46/+118
| | | | | | | | | | Fix: JOGL GLContextLock starvation - Apply changes made in RecursiveToolkitLock (c8a9c59e4838cd43090378a7ed60544449472801), ie notifyAll() -> notify(), plus sync (flow/mem) usage. Fix: Tighten NEWT/AWT focus unit tests - AWTRobotUtil.requestFocusAndWait() waits for EventCountAdapter gain and lost focus as well. - In case of NewtCanvasAWT, additionally wait for it's lost focus
* Fix: NEWT/AWT Focus unit testsSven Gothel2010-10-0712-34/+156
| | | | | | - Added reset() to EventCountAdapter, to ensure a unqiue start state - Removed 'lost focus' assertion, since this event might be pending and we don't poll on it or have a barrier
* Fix: NativeWindow RecursiveToolkitLock, GLWindow lockSurface/unlockSurfaceSven Gothel2010-10-078-89/+421
| | | | | | | | | | | | Fix: NativeWindow RecursiveToolkitLock - Use notify(), instead of notifyAll(), so only one thread is being awakened for the single resource. Otherwise starvation and timeout happen, since the oldest thread might not get waken up (earlier than other threads) within timeout. - Inner class for all synchronized (flow/mem) fields for easier fine grained sync/lock. Fix: GLWindow lockSurface/unlockSurface - Enter locked surface block only if surface lock could be acquired
* NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit testSven Gothel2010-10-0691-704/+1105
| | | | | | | | | | | | | | | | | | | | | | | | | NativeWindow/NativeSurface Refactoring - Using NativeSurface interface - NativeWindow extends NativeSurface, adds getLocationOnScreen(Point) - NativeWindow add: getParent() - NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must. - NullWindow -> ProxySurface impl NativeSurface - JOGL: Uses NativeSurface only. - GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface() Added mouseClick NEWT/AWT unit test JOGL: - GLAnimatorControl add: resetCounter() - NEWT: - GLWindow counters: return GLWindow counters always - WindowImpl - requestFocus() wait until done - reparent: readded requestFocusImpl(true), native impl skips java focusAction if reparented - X11Window: Add XRaiseWindow() in requestFocus()
* NEWT/AWT Jnit: Add Robot Mouse Click testSven Gothel2010-10-027-54/+256
|
* Increased junit timout to 30 min. Move ClickTimeout to MouseEvent (public)Sven Gothel2010-10-023-4/+7
|
* Newt/AWT Reparenting: Remove error prone requestFocus in critical pathSven Gothel2010-10-013-12/+4
|
* NEWT/AWT Unit Tests: Run one test at a time via superclass ↵Sven Gothel2010-09-3035-52/+117
| | | | | | | | | | | BeforeClass/AfterClass FileLock Due to the fact that any test with a UI may interfere with a UI test (test focus, active, ..), all tests are derived from the common UITestCase superclass, which decorates the test class with a FileLock at BeforeClass/AfterClass. Increased junit timeout to 10 min
* Newt/AWT Unit Test: Remove 'Test' Prefix from interfaceSven Gothel2010-09-301-0/+0
|
* Newt/AWT: Add singleton test instance lock for all AWT Robot tests, ↵Sven Gothel2010-09-306-1/+168
| | | | otherwise multiple parallel tests will render the result invalid
* NEWT Reparenting: Only lock parentWindow during native reparent attempt, ↵Sven Gothel2010-09-281-21/+27
| | | | otherwise it may cause deadlock (AWT EDT)
* NEWT: Newt/AWT Rollback AWTParentWindowAdapter changesSven Gothel2010-09-283-17/+4
|
* NEWT Focus fixes / out.println -> err.printlnSven Gothel2010-09-2813-36/+63
| | | | | | | | NEWT Focus fixes: WindowImpl.setFocusAction(): fix (was never set) NewtCanvasAWT.FocusActionImpl: KeyboardFocusManager.clearGlobalFocusOwner() after requestFocusAWTParent()
* NEWT Unit Focus Test: AWT Permanent focus check without focus count (due to ↵Sven Gothel2010-09-283-32/+59
| | | | temp loss) - instead test focus with key input.
* NEWT Unit Focus Test: Use AWT permanent focus check on request.Sven Gothel2010-09-285-56/+64
|
* JUnit test: Check of GL3 availability to not let test failSven Gothel2010-09-282-1/+42
|
* Unit test: Add 'Robot' for test classes using AWT RobotSven Gothel2010-09-283-6/+6
|
* NEWT Robot Unit Tests: Bring Window to Front and position mouseSven Gothel2010-09-275-47/+57
|
* NEWT EDT: Handle stop case if not on EDTSven Gothel2010-09-271-27/+43
|
* NEWT/AWT focus tests: Enhance, use robot and programatic. Start with a focus ↵Sven Gothel2010-09-269-92/+721
| | | | on an AWT device. Wait until TO or event received.
* NEWT: Add Window.hasFocus() ; Test cleanup ..Sven Gothel2010-09-267-5/+27
| | | | | | - Window add focus tracking and query via hasFocus() - TestTransformFeedbackVeryingsBug407NEWT allow fail if no GL3 is available - TestFocus01SwingAWT check on NEWTChild focus
* Add main() to TestFocus01SwingAWTSven Gothel2010-09-262-1/+34
|
* Ensure that receiving focus is passed on to any NEWT child.Steve Vaughan2010-09-261-6/+7
|
* New test to check on keyboard focus.Steve Vaughan2010-09-261-0/+189
|
* RecursiveToolkitLock default TO 5sSven Gothel2010-09-262-4/+4
|
* NEWT: Fix WindowImpl: Bring back 'isValid()' test no screen!=null in ↵Sven Gothel2010-09-263-6/+19
| | | | destroy() ; DisplayImpl: refCount reset
* NEWT: Fix destruction of not yet realized Window/Screen/Display ; Bug411 ↵Sven Gothel2010-09-264-43/+65
| | | | Test: Add parallel NEWT animation.
* Unit test for Bug 411 (Pre AWT/Swing Usage, Mixed usage with JOGL) - ↵Sven Gothel2010-09-256-23/+375
| | | | | | | | | | | | | GLCanvas NPE fix - NewtCanvasAWT added destroy(..) Unit test for Bug 411 (Pre AWT/Swing Usage, Mixed usage with JOGL): Added exhausting Pre AWT/Swing usage test utilizing a later JOGL init with GLCanvas and NEWTCanvasAWT. This works for NV+X11+Ubuntu+64bit, have to do more testing. GLCanvas NPE fix at destroy/dispose, check if already destroyed, ie context==null NewtCanvasAWT: Add destroy() and destroy(boolean unrecoverable)
* NEWT: Changed Lifecycle of Display/Screen (part 4) - Reparenting - TestsSven Gothel2010-09-2325-146/+557
| | | | | | | | | | | | | | | - Adapted tests to API changes - Notably new Display lifecycle / Reparenting tests: - TestDisplayLifecycle01NEWT - Tests display lifecycle - TestParenting01NEWT - Tests various reparenting cases (native/recreate) - TestParenting01bAWT - Tests Animator/FPSAnimator with reparenting (AWT/Newt) - Other changes: - TestGearsNEWT: Added 'on-the-fly' KeyAdapter inducing a GLRunnable into the GLWindow for fullscreen toggle. -
* NEWT: Fix Display/Window/Screen OO Identity, Reparenting and requestFocusSven Gothel2010-09-2339-2807/+3517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NativeWindow: Interface NativeWindow changes: - Remove 'throws' qualifier in lockSurface(), since it is not - Adding convenient 'one call' isSurfaceLockedByOtherThread() - Adding getSurfaceLockOwner() NEWT Window/GLWindow: - Unclutter Window/GLWindow relationship - save Window's indentity GLWindow's role is a GLAutoDrawable implementation aggregating (maybe even compositioning) a Window. The previous implementation just derived from the Window implementation, overwriting methods and fields - impossible to ensure sanity / completness. It was also not ensured that the added functionality of GLWindow (setVisible, destroy, ..) has been issued in case of handling the aggregated Window alone (window callbacks, ..). To solve this issue in a 1st attempt without changing the GLWindow API, Window is just an interface, being implemented by their specializations, hence sanity is intrinsic. GLWindow's added functionality is ensured by a Window.LifecycleHook interfaced implementation, registered at the aggregated Window. - Screen and Window are interfaces now (new files) - Display is an abstract class. - Their (abstract) implementations resides in impl/<BaseName>Impl - GLWindow implements Window as well - Remove Screen reference handled by setScreen(Screen) method. - Lock native parentWindow if used (createNative/reparenting) - Move lockSurface/unlockSurface from unchecked override pattern to an callback style using abstract methods lockSurfaceImpl/... - Sorting all methods to semantic sections, abstract, superinterface, .. - Reparenting: Handling different reparenting situations: - Unchanged - No change - Native Reparenting - Compatible Display/Screen, try native reparenting - Native (Re)Creation - Use destroy/create pattern - Native Creation Pending - Create later - setUndecorated() calls reconfigure Window now, ie tries to change the window actually - Don't issue 'requestFocus()' directly from the native implementation anymore, call it from the Java code. - Window/GLWindow/NewtFactory: Constructor simplification Avoid explosion of constructor overloading, ie removing the 'undecorated' variant, since this is redundant due to the 'setUndecorated(boolean)' method. - Fixed/added API documentation
* NEWT: Fix EDTUtil/DefaultEDTUtil - Locking/BehaviourSven Gothel2010-09-233-120/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EDTUtil: - Added documentation to EDTUtil interface - Removed 'stop()', introduced 'invokeStop(Runnable)', allowing proper shutdown with a final task (see doc). - Fix (c) header, since it is a new file, changed to interface with df161c9fcc1bc90d03e374e0eb8148424d4c5577 DefaultEDTUtil: - Move EDT scope volatile states (shouldStop, edtTasks) into inner class EventDispatchThread (the actual EDT). Fetching those outer instance values from within the inner EDT instance results in 'old values', ie this memory didn't get updates/synced. - Give the thread a proper name: <invocation-thread-name>-<custom-name>-EDT-<start-sequence-number> This allows easy identification of the EDT incl. indication of the 'start' sequence number. - Added fail-fast Exceptions in case of a stopped EDT with remaining tasks. This should validate/test the runtime behavior. - Ensure isRunning(), invokeStop(..) and waitUntilStopped() only returns after the last task has been executed. - invokeImpl/EDT.run: Complete task-lock coverage incl. wait case. - The final task is blocked until the wait() state in invokeImpl is reached. - EDT executes the final task and notifies the lock owner - then exist - invokeImpl leaves the wait state. - See EDTUtil API doc ..
* NEWT: Animator API Change - Changed Lifecycle of Display/Screen (part 4)Sven Gothel2010-09-2313-292/+731
| | | | | | | | | | | | | | | | | | | | | Change GLAutoDrawable interface: setAnimator(Thread) -> setAnimator(GLAnimatorControl) to minimize the setAnimator(..) calls and to allow fine grained control over the animation, ie in case of reparenting where the animation shall pause while changing the window(s). Introducing GLAnimatorControl interface: - abstract class AnimatorBase implements GLAnimatorControl - class Animator extends AnimatorBase - class FPSAnimator extends AnimatorBase This also changes FPSAnimator, since it is no more derived from Animator, use it's superclass or superinterface instead. +++ - Fix GLJPanel.paintComponent(): Don't issue reshape/display in case an external animator thread is animating. - Fix: Documentation [API]
* NEWT: Changed Lifecycle of Display/Screen (part 3)Sven Gothel2010-09-164-19/+33
| | | | | | | | | | | | | | - Fix DefaultEDTUtil deadlocks: Minimize locking! - invoke: - Check isCurrentThreadEDT() before locking edtLock - Check isRunning() redundant, since we start it beforehand - EventDispatchThread.run(): - Relax definition of EDTUtil::waitUntilIdle(), ie method may return while last task is being executed (see below). - Execute task outside of edtTasks lock. TODO: Fix more test cases (new and old)
* NEWT: Changed Lifecycle of Display/Screen (part 2)Sven Gothel2010-09-1518-206/+550
| | | | | | | | | | | | | | | | | | | | | Window Reparenting (unification): On the fly Display/Screen creation resides in NewtFactory. Reparenting logic within Window. Handles all reparenting cases now: ACTION_NONE, ACTION_SOFT_REPARENTING, ACTION_NATIVE_REPARENTING, ACTION_NATIVE_CREATION - out.println -> err.println ++++ - Bumbed windows bat scripts to 1.6.0_21 and ant 1.8.1 - Debug: /RecursiveToolkitLock.java TO is 300s for now, while not finished. - +++ Needs more testing. Deadlocks: AWT/NEWT parenting.
* Merge branch 'master' into newt_display_unkey_threadSven Gothel2010-09-1595-2108/+1853
|\
| * Misc CleanupsSven Gothel2010-09-159-43/+21
| | | | | | | | | | | | | | | | - www/index.html: absolute local refs -> relative - Platform GLContextImpl specialisations: remove local overriding drawable instance - X11ExternalGLXDrawable: Remove dead code, left over.
| * Merge branch 'master' of github.com:mbien/joglSven Gothel2010-09-1519-120/+73
| |\
| | * COPYRIGHT.txt no longer exists -> don't copy it.Michael Bien2010-09-141-1/+0
| | |
| | * Merge branch 'master' of git://github.com/sgothel/joglMichael Bien2010-09-1018-86/+98
| | |\
| | * | trivial code cleanup in glx package.Michael Bien2010-09-0917-118/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - locks are final - debug prints use System.err exclusively (to prevent message corruption) - removed unused imports, unused variables - code cleanup in some places