Bug 909 - Reccreate GLJPanel's BufferedImage is no more sourced by singleton AWTGLPixelBuffer
GLJPanel must validate whether it's local BufferedImage's DataBuffer is sourced by the current singleton AWTGLPixelBuffer.
Case: GLJPanel-B has created a new singleton AWTGLPixelBuffer w/ increased size. Previous created GLJPanel-A's local BufferedImage's DataBuffer is no more sourced by the singleton AWTGLPixelBuffer and hence must be re-created.
Bug 672 (NewtCanvasSWT ignore windowing offset on OSX'). The NewtCanvasSWT is now brought into place by the parent SWT Composite and the super SWT Canvas it extends. Also added two test cases. One with a simple SashForm and the NewtCanvasSWT in the second cell, and another with the NewtCanvasSWT in a Composite, that Composite now in the second cell of the SashForm. The second test is necessary because the NewtCanvasSWT does not receive SWT.Resize events in this configuration, but only SWT.Paint ones (a behaviour inherited from the super SWT Canvas)
Bug 672 (NewtCanvasSWT): Reuse SWTAccessor.isOS_TYPE ; Impl NW.getLocationOnScreen(..) for X11 and Windows ; Allow unit test to run on all platforms.
- Reuse SWTAccessor.isOS_TYPE (public now)
- Impl NW.getLocationOnScreen(..) for X11 and Windows reusing existing native code
- Allow unit test to run on all platforms.
Note: NewtCanvasSWT unit tests require a 'wait for realized' while SWT dispatching. Otherwise the 'sash unit test' will fail since realiziation happens later, at least on X11.
Hence extended AWTRobotUtil.waitForRealized(..) to use a 'waitAction' which is used here w/ special SWT dispatch Runnable.
AWTRobotUtil.waitForRealized(..) operates on time-delta instead of iteration-counter, allowing above 'waitAction' Runnable.
Workaround Bug 910 (IcedTea-Web): NewtCanvasAWT shall postpone JAWTWindow destruction via explicit set flag.
IcedTea-Web_1.5pre+rbc73a1362e9c still issues NewtCanvasAWT.removeNotify() before before Applet.destroy(), i.e. removes NewtCanvasAWT from the Container ahead of time (Applet protocol destroy()).
However, it fixes the non AWT-EDT issue, i.e. calls NewtCanvasAWT.removeNotify() from the actual AWT-EDT - good.
Since the root cause still exist, we cannot use heuristics as described in Bug 910 comment 9, but need to set a flag in NewtCanvasAWT to skip JAWT destruction and remove it latter within Applet.destroy().
Bug 910: Add Standalone Extended Applet Lifecycle Validation Test
Test is online @ http://jogamp.org/deployment/test/bug910/
Test validates the state of the added component: TC1 - addNotify() and removeNotify() has been called from AWT-EDT. TC2 - removeNotify() is not called before Applet.destroy()
Test also validates the Applet state: TA1 - isActive() TA2 - init count TA3 - start count TA4 - stop count TA5 - destroy count
Cleanup Commit e9c711a86aa05f4f24c69972532833f5a98911a3: - Fix while loop in SendCloseMessage (native)
- static 'threadid' must be volatile
- Whitespace
- Redundancy - CreateDummyWindow
- Scope (java, move JNI funcs back to private)
- Remove [invalid] pointer usage (native) - ThreadParam's threadReady and hWndPtr shall not be pointers - invalid - No need to use a threadReady pointer.
- Validate threadid (native)
TODO: - Make 'native dispatch thread' optional - Store 'native dispatch thread' in window class
Proper OO integration of DDT in RegisteredClass - DDT is optional to RegisteredClass[Factory], i.e. NEWT without DDT and DummyWindow with DDT.
- Using native type DummyThreadContext per DDT passed as DDT handle to java referenced in RegisteredClass
- Passing DDT handle to related native methods, if not null use DDT - otherwise work on current thread. The latter impacts CreateDummyWindow0 and DestroyWindow0.
Safe DDT Post/WaitForReady handling and error cases ; ... - Wait until command it complete using a 3s timeout - Terminate thread if errors occur and throw an exception
+++
Discussion: DDT Native Implementation
Due to original code, the DDT is implemented in native code. Usually we should favor running the DDT from a java thread. However, since it's main purpose is _not_ to interact w/ java and the native implementation has less footprint (performance and memory) we shall be OK w/ it for now - as long the implementation IS SAFE.
GLJPanel.initializeBackend(offthread=true): Enable on Windows, thanks to Bug 907 impl. DummyDispatchThread (DDT)
Bug 907 implemented DDT used to create and destroy offscreen surface's dummy drawable on Windows. This enables offscreen initialization on Windows running from a short lived arbitrary thread.
Bug 914 - Don't allow 'alwaysontop' in fullscreen mode, always allow switching to other applications via ALT-TAB
As described @ <http://forum.jogamp.org/Regression-of-alwaysOnTopBug-tp4030735p4030738.html>, we shall not steal the desktop in fullscreen mode via 'alwaysontop'.
Latest tests on X11/GNU/Linux and Windows7 - before this patch:
With default settings, i.e. alwaysontop (atop) disabled, it works as expected here, i.e.: - ALT-TAB triggers WM dialog, switching between apps. - ALT-TAB can actually switch to other apps.
However, with enabled atop: - ALT-TAB triggers WM dialog, switching between apps. - ALT-TAB does _not_ switch to other apps. (*)
I consider this a serious issue, since we shall not steal the desktop in fullscreen mode.
This patch disables atop in fullscreen mode, i.e. (*) will switch to other apps again!
Commit 69c334448cfe8af553fd97689137ecf8f996b378 started using the [NSApp setPresentationOptions: opts] but missed to reset to defaults @ windowClose0();
- Assume having focus in fullscreen-mode NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode!
Note: OSX Fullscreen from a browser still shows the browser title-bar until mouse-click. Don't know how to avoid this. Minor issue..
Bug 747: VectorUtil: Make scale(..) creating new float[] deprecated, adding 'in place' variant w/ passing result float[] ; TODO: Replace all variations with 'in place' version to be more memory efficient.
Make scale(..) creating new float[] deprecated, adding 'in place' variant w/ passing result float[]
TODO: Replace all variations with 'in place' version to be more memory efficient.
See Bug747: Validate memory footprint and usage / General performance
Bug 904: 'User Vertical Flip' for GLJPanel shall be performed via PROJECTION matrix scaling instead of MODELVIEW rotation ...
'User Vertical Flip' for GLJPanel shall be performed via PROJECTION matrix scaling instead of MODELVIEW rotation to simplify workflow, and to remove artifacts w/ tiled printing.
Bug 922 (1/2): NEWT Window.reparentWindow(..): Provide REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints; Deprecate other reparentWindow(..) variants w/o hints.
NEWT Window.reparentWindow(..): Provide REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints: - Add REPARENT_HINT_FORCE_RECREATION, covering 'old' forceDestroyCreate boolean argument - Add REPARENT_HINT_BECOMES_VISIBLE, Claim window becomes visible after reparenting, which is important for e.g. preserving the GL-states in case window is invisible while reparenting.
Deprecate other reparentWindow(..) variants w/o hints.
Use only new variant using hints w/o semantical change.
Bug 918 (2/2): Determine StreamWorker usage after stream-init ; Fix seek(..) ; Fallback for EOS Detection ; MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek
Determine StreamWorker usage after init - To support audio only files, we need to determine to use StreamWorker after completion of stream-init.
Fix seek(..) - FFMPeg: pos0 needs to use aPTS for audio-only - Clip target time [0..duration[
Fallback for EOS Detection In case the backend does not report proper EOS:
- Utilize 'nullFramesCount >= MAX' -> EOS, where MAX is number of frames for 3s play duraction and where 'nullFramesCount' is increased if no valid packet is available and no decoded-video or -audio in the queue.
- Utilize pts > duration -> EOS
MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek - Matroska seek for audio-only leads to EOS .. http://video.webmfiles.org/big-buck-bunny_trailer.webm
- MP4 audio-only seek works http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4
MovieSimple/MovieCube: - Use audio-pts in audio-only to calc target time
Tested: - A, V and A+V - Pause, Stop and Seek - GNU/Linux
- stopImpl() shall always issue alSourceStop(..) if state is not STOPPED - Remove 'flush' hint for dequeueBuffer(..), we perform proper flush in respective method, see below - flush() needs to issue: - stopImpl() - which should already dequeue all buffers - Explicitly dequeue all buffers: via 'alSourcei(alSource[0], AL.AL_BUFFER, 0)' - Then dequeue manually processed buffers: dequeueBuffer( false /* wait */ ); - And dequeue _all_ buffers: dequeueForceAll();