aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* OSX/Java7/CALayer + JAWT: Partially Fix AWT/NEWT CALayer 'out of sight' bug, ↵Sven Gothel2013-02-2016-62/+205
| | | | | | | | | | | | | | | | | | | | | | | | | where our CALayer is moved out of the visible area - same erroneous behavior for GLCanvas and NewtCanvasAWT - sized-frame: Set framesize and validate() it - sized-component: Set component preferred size and call frame.pack() - added workaround 'OffscreenLayerSurface.layoutSurfaceLayer()' to fix CALayer size, which snaps for: - OK initial size before setVisible: sized-frame and sized-component - OK resize w/ sized-frame - OK manual frame resize - Invisible: w/ sized-component after setVisible() ++ - CALayer-Sublayer (GL) has additional retain/release when added/removed to be on safe side.
* NewtCanvasAWT: Fix size determination, i.e. take newt-child's size into ↵Sven Gothel2013-02-201-6/+10
| | | | account if no preferred size is given.
* NEWT/OSX: Fix 'locationOnScreen' usage and use proper client-area window ↵Sven Gothel2013-02-205-83/+95
| | | | | | screen position (Fixes resize -> position) - Tested w/ NEWT GearsES2 and Java6 and Java7 on OSX
* Unit Tests: Add [manual] demo cases for SWT (TestGearsES2SWT, ↵Sven Gothel2013-02-205-32/+990
| | | | TestGearsES2NewtCanvasSWT); Add more AWT/NEWT layout scenarious.
* Unit Tests NewtEventModifiers (2): RobostnessSven Gothel2013-02-195-9/+8
| | | | | | | - clearKeyboadAndMouse(): Add _testMouseListener.clear(); to clear all logs! - clearKeyboadAndMouse() after all tests - use implicit 'clearKeyboadAndMouse()' in execOffThreadWithOnThreadEventDispatch()
* Unit Tests NewtEventModifiers: Attempt to make them more robust for that one ↵Sven Gothel2013-02-195-9/+21
| | | | | | | particular Windows-AMD Test Node - Adding 'waitForVisible' and 'waitForRealized' on the GLAutoDrawable before test - Adding clearKeyboadAndMouse before test
* Bug 678 (fix), Bug 641 (API + Windows Impl.), Bug 688 (prep): Update NEWT's ↵Sven Gothel2013-02-1937-1418/+1578
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KeyEvent handling while distinguish keyCode (kbd layout independent) and keySym (kbd layout dependent) API Changes: - Virtual key codes and symbols are of type short. - KeyEvent.keySymbol() shall return a layout dependent value (Bug 641) - Method returns former keyCode() value, which was layout dependent. - Returns 'short' value - KeyEvent.keyCode() returns a short value, instead of int - KeyEvent.keyCode() shall return a layout independent value (Bug 641) - To ease implementation, we only 'require' the scan code to be mapped to a 'US Keyboard layout', which allows reusing layout dependent code while preserving the goal to have a fixed physical key association - Implementation status: - Windows OK - X11 TODO - OSX: 50/50 TODO - Using layout independent 'action keys' - Using layout dependent 'printable keys' - returning above semantics for both, keyCode and keySym - Android 50/50 TODO - Returning the layout independent keyCode - Mapping probably incomplete - KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent) (Bug 688) - Marked DEPRECATED - No more called for auto-repeat events - Synthesized in WindowImpl.consumeKeyEvent(..): No more injection by native- or java driver code - NEWTEvent.eventType: int -> short - field, as well as all method involving eventType changed to short. - NEWTEvent.isSystemEvent: REMOVED - Never used as well as never being implemented properly Internal Changes: - Simplified keyEvent driver code - Especially the Windows native driver's mapping code could be simplified using scanCode and MapVirtualKeyEx - NEWT Event Factories: hashMap -> switch/case Unit Tests: - - Added NewtCanvasAWT Offscreen Layer Tests important to test the AWT -> NEWT translation on OSX/CALayer: - TestNewtKeyCodeModifiersAWT - TestNewtKeyCodesAWT - TestNewtKeyEventAutoRepeatAWT - TestNewtKeyEventOrderAWT - TestNewtKeyPressReleaseUnmaskRepeatAWT
* Unit Tests: Add 'results-java7' to check-junit.sh (Completes commit ↵Sven Gothel2013-02-171-0/+1
| | | | fc9539d50c12f9def7a3babde7384e3d38f61721)
* Unit Tests: Use Property 'jvmJava.exe' ; Add target 'junit.run.local.java7' ↵Sven Gothel2013-02-172-11/+42
| | | | | | (if="jvmJava7.exe") See GlueGen commit 6b86764f2e195b4046000fd5a7fcf3331ca72d21
* OSX/Java7 Cleanup: Remove JavaNativeFoundation dependency; ↵Sven Gothel2013-02-178-26/+65
| | | | NativeWindow-JAWT: Remove c.fixup.jawt.version.macosx (redundant, libjawt.dylib is rpath'ed always)
* Add proper copyright header w/ all remarks regarding re-distribution etc, ↵Sven Gothel2013-02-171-15/+33
| | | | similar to other JNI headers
* build-test.xml: Move 'junit.run.newt.awt' up in file; 'junit.run.newt': ↵Sven Gothel2013-02-171-38/+40
| | | | Exclude *AWT* and *SWT* (similar to 'junit.run.newt.headless')
* NEWT/OSX: Fix Memory Leak ; Fix Occasional Crash Duer to Lifecycle Ops not ↵Sven Gothel2013-02-1710-75/+248
| | | | | | | | | | | | | | | | on Main-Thread. - Fix Memory Leak - NewtWindow::dealloc -> [NewtView release]: Fixes NewtView leak - NewtView::dealloc -> removeTrackingRect: Removes occasional crash (double free of TrackingRect) - Fix Occasional Crash Duer to Lifecycle Ops not on Main-Thread. Perform OSX WindowDriver ops on Main-Thread: - close0 - changeContentView0 - createWindow0 - Cleaned up AddRemove unit tests, added TestAddRemove03GLWindowNEWT
* TestWindowClosingProtocol01AWT: More relaxed timing reducing false positivesSven Gothel2013-02-164-4/+17
|
* Uni Tests AddRemove: Remove dead code ..Sven Gothel2013-02-162-40/+0
|
* Fix Bug 644: AWT GLCanvas and GLJPanel ignored their visibility stateSven Gothel2013-02-166-18/+305
| | | | | If !visible, GLCanvas and GLJPanel's paint* and display method shall not render as the other GLAutoDrawable impl. do (GLWindow, SWT GLCanvas).
* Fix TestWindowClosingProtocol01AWT: GLCanvas closing operation 'destroy' ↵Sven Gothel2013-02-161-1/+0
| | | | will no more call removeNotify() - see commit 3567e7e8519f82720f98b0b2ac30456cbfeddc0d
* X11/WGL: Better Exception Message for failed ARB context creation if profile ↵Sven Gothel2013-02-162-2/+2
| | | | > GL2 (OpenGL >= 3.0.1) was requested.
* Fix Bug 691 (part-3): NSOpenGLLayer::openGLContextForPixelFormat(..) on ↵Sven Gothel2013-02-1611-21/+123
| | | | | | | | | | | | | | | | | | | | main-thread deadlock'ed due to locked shared context NSOpenGLLayer::openGLContextForPixelFormat(..) is performed on main-thread at 1st NSOpenGLLayer display method. This happened irregulary, i.e. sometimes (T0) right after NSOpenGLLayer creation and attachSurfaceLayer()/AddCASublayer(..), sometimes later (T1). NSOpenGLLayer::openGLContextForPixelFormat(..) uses the passed shared user context. The shared user context is locked at NSOpenGLLayer's creation (T0) and if performed at this early time the call deadlocks due to pthread_mutex wait for the shared user context. This fix performs NSOpenGLLayer creation and layer attachment while the shared user context is kept unlocked and enforces NSOpenGLLayer display and hence NSOpenGLLayer::openGLContextForPixelFormat(..). Added CGL.setNSOpenGLLayerEnabled(..) to enable/disable NSOpenGLLayer - currently not used. - Passed AddRemove tests for GLCanvas/Swing and GLWindow/NewtCanvasAWT w/ 100 loops on Java6 and Java7 on OSX. - Passed Instruments Leaks test w/ 10 loops on Java6 and Java7
* Refine unit test for Bug 691: Add onscreen/offscreen tests [if available] ; ↵Sven Gothel2013-02-153-19/+62
| | | | Move tests to 'acore'.
* Fix Bug 675: NPE w/ Beans.setDesignTime(true) ; Fix GLCanvas.destroy(): ↵Sven Gothel2013-02-153-122/+250
| | | | | | | | | | | | | | | Don't issue removeNotify(), delete drawable and context only! - Fix Bug 675: NPE w/ Beans.setDesignTime(true) - Carefully consider Beans.isDesginTime() fixes NPE - added unit test - Fix GLCanvas.destroy(): Don't issue removeNotify(), delete drawable and context only! - AWT removeNotify() shall only be issued via AWT itself, not manually - Add 'destroyImpl(boolean destroyJAWTWindowAndAWTDevice)' to be called by - GLCanvas.destroy(): destroyImpl( false ); - GLCanvas.removeNotify(): destroyImpl( true ); - Ensures JAWTWindow and AWTDevice are created and destroyed via the AWT callbacks addNotify() and removeNotify() only.
* Fix Bug 691 (part-2): Extra '[subLayer release]' is wrong, since ↵Sven Gothel2013-02-1513-107/+438
| | | | | | | | | | | | | | | | | | | | 'CGL.releaseNSOpenGLLayer' triggers release - but very late w/ AWT usage. OSXUtil_RemoveCASublayer0's added '[subLayer release]' in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161 is wrong, since 'CGL.releaseNSOpenGLLayer' actually does trigger it's release. This was not seen w/ AWT tests, since it happens very later. A NewtCanvasAWT test disclosed this error -> removed that extra release call. The culprit for the late release w/ AWT usage was CGL.createNSOpenGLLayer's call in the current thread. Moving it to the Main-Thread fixed the problem. All CALayer lifecycle calls are issued on the Main-Thread now. NSOpenGLLayer's CVDisplayLink OpenGL fitting via 'CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext' is now performed at it's context creation in 'NSOpenGLLayer::openGLContextForPixelFormat'. The 'extra' release of the NSOpenGLLayer's NSOpenGLContext as introduced in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161 is still valid.
* Fix OSX CALayer Bug 690 and Bug 691: Occasional Freeze on CVDisplayLinkStop; ↵Sven Gothel2013-02-1412-139/+596
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layers and native GL-Context are _not_ Released ; Java Side wait for Main-Thread - Fix Bug 690: Occasional Freeze on CVDisplayLinkStop - NSOpenGLLayer.disableAnimation() shall not claim the renderLock mutex, since the CVDisplayLink callback could be waiting for the lock. This waiting callback could freeze the call to CVDisplayLinkStop. - Fix Bug 691: Layers and native GL-Context are _not_ Released - Following proper release cycle: Context unrealized: - JAWTWindow.detachSurfaceLayer() -> OSXUtil.RemoveCASublayer(..) - CGL.releaseNSOpenGLLayer(..) JAWTWindow.destroy() - MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..) - OSXUtil.DestroyCALayer(..) - 'Magic' CALayer release calls (w/o manual retain beforehand) at: - OSXUtil.RemoveCASublayer(..): [subLayer release] - MacOSXJAWTWindow.UnsetJAWTRootSurfaceLayer(..): [rootLayer release] - OSXUtil.DestroyCALayer(..): [rootLayer release] - 'Magic' NSOpenGLLayer's NSOpenGLContext dealloc: - [NSOpenGLContext clearDrawable] - CGLDestroyContext( [NSOpenGLContext CGLContextObj] ) - Java Side wait for Main-Thread - Waiting for the delegated Main-Thread on the Java side eases debugging and won't block the Main-Thread in native code. - Utilizing this for all CALayer calls Test case: TestGLCanvasAddRemove01SwingAWT
* Java2D OGLPipeline(GLJPanel+Threading): More fine grained control about OGL ↵Sven Gothel2013-02-123-123/+151
| | | | | | | | threading and resource usage - Still excluse OSX - Respect sun.java2d.opengl property - [Prepare] Allowing OGLPipeline thread usage w/o it's OGL resource usage
* GLContext: *TRACE_SWITCH spacingSven Gothel2013-02-113-14/+14
|
* Fix Animator resume() wait-condition (drawablesEmpty didn't wait for ↵Sven Gothel2013-02-013-24/+41
| | | | pausedIssued); Update TestGLWindows02NEWTAnimated (isPaused())
* Merge pull request #56 from xranby/NEWT-inputSven Gothel2013-01-312-0/+896
|\ | | | | Add LinuxEventDeviceTracker used by RaspPi newt/driver/bcm/vc/iv
| * LinuxEventDeviceTracker: Map printable char using KeyEvent.isPrintableKey.Xerxes Rånby2013-01-311-1/+8
| | | | | | | | | | | | | | The NEWT VK namespace tries to map keyCodes to its Unicode varianti, make use this quirk. Signed-off-by: Xerxes Rånby <[email protected]>
| * LinuxEventDeviceTracker: LinuxEVKey2NewtVKey(EVKey 122-248)Xerxes Rånby2013-01-311-28/+273
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * LinuxEventDeviceTracker: LinuxEVKey2NewtVKey(EVKey 0-121)Xerxes Rånby2013-01-311-81/+257
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * LinuxEventDeviceTracker: gracefully manage hot-swap of USB devices.Xerxes Rånby2013-01-311-24/+29
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * LinuxEventDeviceTracker: LinuxEventDeviceManager monitor /dev/input/event*Xerxes Rånby2013-01-301-4/+58
| | | | | | | | | | | | | | The LinuxEventDeviceManager will start new EventDevicePoller threads when more /dev/input/event* files become available. Signed-off-by: Xerxes Rånby <[email protected]>
| * Add LinuxEventDeviceTracker used by RaspPi newt/driver/bcm/vc/iv/WindowDriverXerxes Rånby2013-01-302-0/+409
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | Android GearsES2 Launcher: Revert debug flags ..Sven Gothel2013-01-311-2/+2
| |
* | Android: Adapt to cleanup of ClassLoaderUtil/LauncherUtil - GlueGen Commit ↵Sven Gothel2013-01-3117-91/+239
| | | | | | | | b47d0d92dd222999bf38633de1cec8de6a7ad369
* | Bump Android NDK to android-ndk-r8dSven Gothel2013-01-312-16/+18
|/
* Fix AWTKeyAdapter: Reorder AWT events to NEWT order - also ensuring TYPED is ↵Sven Gothel2013-01-306-30/+353
| | | | | | | always sent. This foremost fixes an issue w/ OSX/Java7 and NewtCanvasAWT offscreen CALayer usage, which utilizes AWTKeyAdapter and AWTNewtEventFactory (AWT -> NEWT) key events.
* Add OSX Java7 build/test scriptsSven Gothel2013-01-302-0/+38
|
* OSX unit tests: Disable OSX 32bit tests (redundant - prepare for Java7 tests)Sven Gothel2013-01-291-2/+3
|
* Fix Bug 678: Deliver key-char value for printable chars on all ↵Sven Gothel2013-01-299-77/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | KeyEventListener (-> On Windows as well) The following is observed, where t0 and t1 refer to subsequent different timestamps: NEWT delivery order: PRESSED (t0), RELEASED (t1) and TYPED (t1) WINDOWS delivery order: PRESSED (t0), TYPED (t0) and RELEASED (t1) Windows Auto-Repeat: PRESSED (t0), TYPED (t0) Hence we changed the event reorder-code in NEWT to trigger NEWT-PRESSED on Windows-TYPED for printable chars, assuring key-char values on all listener callbacks. - KeyEvent.getKeyChar(): Removed disclaimer dedicated for Windows - Keyevent.isActionKey(): Completed for all NEWT non-printable action keys; Added static variant - Keyevent.isPrintableKey(): NEW: returns !isModifierKey(keyCode) && !isActionKey(keyCode) ; With static variant - Windows WindowDriver: - EVENT_KEY_PRESSED handles non-printable chars only - EVENT_KEY_TYPE handles printable chars only - Native: VK_DELETE passes keyCode - Unit tests: Wait for completion 1s -> 2s
* Add WindowClosingProtocol impact detail on ↵Sven Gothel2013-01-281-1/+10
| | | | WindowListener.windowDestroyNotify(..)
* Bug 665 (part 3) - Allow dis-association of GLContext's GLDrawable .. - Add ↵Sven Gothel2013-01-277-53/+219
| | | | | | | | | | | | | | | | | | | | | | | | | EGL/ES2 tests, attempt to fix wrapped EGL case - Bug 665 (part 2) was commit 7fd5f76e1eb4bbf93fe9b1171744bd755d8f96e4 - Add EGL/ES2 tests in - TestGLContextDrawableSwitch01NEWT - TestGLContextDrawableSwitch11NEWT - Attempt to fix wrapped EGL case (incomplete) - Using EGL/ES w/ non native EGL device/surface, but natively wrapped instances (most of the cases), a 'complicated' delegation of Native-Upstream -> EGL-Proxy -> EGL-Instance is being used heavily relying on the objects lifecycle. GLEventListenerState tries to roll back the realized state and even sets the upstream device handle, but this doesn't seem to be sufficient on X11. Discussion: It might turn out that we only can implement the survival of GLContext and it's display device reliable w/ EGL within the GLAutoDrawable implementation, which can hold the previous not destructed instances.
* Fix regression of commit b738983638703bb721ee4c9820c8ef43e2252e73, possible ↵Sven Gothel2013-01-271-1/+4
| | | | 'pulling' display's device - check references
* GLDrawableHelper.invoke: If drawable is !realized -> deferred executionSven Gothel2013-01-271-2/+2
|
* Fix misc API docs ..Sven Gothel2013-01-273-3/+6
|
* Animator: API doc cleanup, isPaused()==true if drawablesEmpty (Animator == ↵Sven Gothel2013-01-273-19/+41
| | | | | | | | | | | | FPSAnimator behavior), resume after add ifPaused() - GLAnimatorControl: Refine API doc - Animator.run(): - if( drawablesEmpt) { pausedIssued = true; } - Same behavior as FPSAnimator - AnimatorBase.add(..) - consider paused case if no drawablesEmpty, i.e. if ( isPaused() ) { resume(); }
* Refine GL[Auto]Drawable 'realized' state in API doc, and relax it's realized ↵Sven Gothel2013-01-265-18/+31
| | | | | | | | | | | | | requirement in GL[Offscreen]AutoDrawableDelegate* Compatible w/ 'before'. TODO: Contemplate about GLDrawableFactory.createOffscreenAutoDrawable(..) whether it: - should better return an unrealized [auto]drawable - or adding another API method for such case Goal: Allow passing vector of [device/context/..] for use cases such as re-using an onscreen destructed surface and on-/offscreen hopping.
* WGLContext: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-261-1/+5
|
* ProxySurface: Add 'NativeSurface getUpstreamSurface()' ; ProxySurfaceImpl: ↵Sven Gothel2013-01-263-16/+32
| | | | | | | | | | | | | | Don't cache 'displayHandle' - ProxySurface: Add 'NativeSurface getUpstreamSurface()' allowing querying direct access of a backing surface representing this instance. - Use case: EGLWrappedSurface - Default impl. returns null - ProxySurfaceImpl: Don't cache 'displayHandle' - getDisplayHandle() is 'final', no more 'shortcut' code allowed due to re-association incl. display handle. - See commit b738983638703bb721ee4c9820c8ef43e2252e73
* [EGL/X11]Context: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-262-10/+20
|