| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
focus/isInside
On OS X 10.6.8 the lack of responder method declarations (mouseEntered, ..)
lead to ignore the impl. callbacks.
'isMouseInside' cannot rely on 'mouseExit'/'mouseEntered' when
setMouseInvisible() is being called, deduce it manually.
focusLost == mouseExit (OS X behavior), hence focusGained needs
to set mouse invisible/visible in case it's requested.
|
|
|
|
|
|
|
| |
ridiculous slow
Each call to CGDisplayScreenSize() took around 6ms (5ms .. 20ms, avrg 6ms)
which added up to ~2s for ~400 Screen modes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
makeCurrent()/release()/destroy() calls ; Enable context switch tracing ; GLCanvas: proper AbstractGraphicsDevice destruction
GLContext*/GLDrawableHelper: Fix consistency of recursive makeCurrent()/release()/destroy() calls
Utilizing volatile and lock.tryLock(0) for lockConsiderFailFast(),
reducing redundant synchronization and using RecursiveLock implicit sync.
GLContext 'early-out' is the case where the thread already holds the
context, ie. context is already current and the native makeCurrent is skipped.
makeCurrent()'s 'early-out' w/o incr. the recursive lock of GLContext
and it's NativeSurface could lead to asymetry in lock/unlock count
with release()/destroy() calls. The 1st release actually released the
native ctx already.
Properly utilize recursive lock/unlock in all cases and impl. 'early-out' after locking.
Following the above in GLDrawableHelper.invokeGL()'s 'early-out' case as well,
ie calling makeCurrent()/release() symmetrical.
Introduce GLDrawableHelper.disposeGL(), which issues dispose on all GLEventListeners
within a current context and issued context destruction directly.
This simplifies GLAutodrawable's destroy/dispose calls and ensures
that the above sequence of events happens atomically (lock is being hold until destruction).
Enable context switch tracing
If property 'jogl.debug.GLContext.TraceSwitch' is defined, trace context switch.
GLCanvas: proper AbstractGraphicsDevice destruction
|
|
|
|
| |
AndroidWindow: Trigger ScreenModeChanged only if Screen is already valid.
|
|
|
|
|
| |
On Gnome it happend that the current mode was not 'scanned' by RandR,
hence adding it if not existing helps stability.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow negative coordinates
- ScreenImpl:
- Use Point & Dimension for holding virtual origin and size
- updateScreenSize() -> updateVirtualScreenOriginAndSize()
- DimensionImmutable getNativeScreenSizeImpl()
-> void getVirtualScreenOriginAndSize(Point virtualOrigin, Dimension virtualSize)
- WindowImpl setFullscreen(true): Use Screen virtual origin
- WindowsWindow.c
- For x/y coords use GET_X_LPARAM/GET_Y_LPARAM which casts '(int)(short)'
to preserve negative coordinates.
- NewtWindow_setVisiblePosSize() allow negative coordinates
|
|
|
|
| |
error, private field access)
|
|
|
|
|
|
|
|
|
|
|
| |
Closing:
- Java: Set handle to null
- Native:
- Don't release the NSView explicit, but rely on NSWindow's release
- Don't use NSWindow close() but simply call release() instead.
The latter doesn't produce a crash SIGSEGV on exit in some cases.
OSX 10.7.2, NV GPU
|
|
|
|
|
|
|
|
|
|
| |
Add updateScreenSize() utilizing new getNativeScreenSizeImpl() to set/update the virtual Screen size.
This replaces setScreenSize() where the ScreenMode dimension was being used
which doesn't reflect the virtual size.
ScreenMode Test Impact:
We cannot assertEquals(sm.getRotatedWidth(), screen.getWidth()),
since ScreenMode size != virtual size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Allow negative window position, using flag 'autoPosition' to mark a custom user position.
This impacts Windows and X11 window creation code, which supports native auto positioning.
- Screen: Validate Screen-Index.
In 'big-desktop' mode the Screen index is always 0. This is true for X11 with
Xinerama enabled and MS-Windows in general.
Platforms w/o multiple Screen support always use index 0.
- X11: Separate X11 Display/Screen/Window native code in their respective C files
- Windows test scripts: use '%*' to catch all arguments
- Add missing (c)
|
|
|
|
|
|
|
| |
rotation! (How to ?)
Get/Set ScreenMode impl on OSX.
Set is limited to resolution and size, since I don't know how to change the rotation.
|
|
|
|
|
|
|
|
| |
based on native RANDR (more correct)
Clarify Screen's getWidth(), getHeight() values (-> rotated)
Also add DEBUG output for collected native modes and nativeIdx mapping.
|
|
|
|
|
|
|
| |
https://jogamp.org/bugzilla/show_bug.cgi?id=531
Sorry .. we normally don't add credits in these git logs,
maybe we should change that to encourage contributors!?
|
|
|
|
|
|
|
| |
atomic java JAR)
- GLProfile, NWJNILibLoader, NEWTJNILibLoader:
Issue Platform.initSingleton() upfront within priviledge block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NewtCanvasAWT/GLCanvas (delegation) ; Fix GLCanvas OffscreenLayerSurface usage.
JAWTWindow.destroy():
- No more getGraphicsConfiguration().getScreen().getDevice().close() call,
since the configuration (hence the device) is passed @ creation and owned by the caller.
New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and NewtCanvasAWT/GLCanvas (delegation)
- Abstract offscreenLayer option to be delegated by using classes
- Allow offscreen testing of GLCanvas as well (like NewtCanvasAWT)
Fix GLCanvas OffscreenLayerSurface usage
- common 'createDrawableAndContext()' for context and drawable instance creation
- addNotify() calls createDrawableAndContext() after super.addNotify() to be able
to lock the surface (JAWTWindow) and hence to determine offscreen usage.
- reshape(...) issues recreation 'dispose(true)' in case of using an offscreen layer
- dispose() explicitly destroys the JAWTWindow
NewtCanvasAWT:
- explicitly close the device of the JAWTWindow (as GLCanvas does)
Tests:
com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT
com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT
|
|
|
|
| |
is called 1st, add tests. Add performance numbers of init/shutdown in tests.
|
|
|
|
| |
GLWindow/NewtCanvasAWT to AWT Applet Container
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'dead' thread (Applets)
GLDrawableFactory:
- clarify: public getWasSharedContextCreated(..) -> protected createSharedResource(..)
- add: getSharesResourceThread()
GLProfile:
- proper locking of initSingletion(..) path:
- Use RecursiveThreadGroupLock and add/remove GLDrawableFactory's sharesResourceThread
while creating it's the sharedResource.
This simplifies and fixes GLProfile's locking code.
- Fix and simplify initSingleton(boolean) API doc - mark it deprecated.
- Add initSingleton() for controlled initialization only, pairing w/ shutdown(..)
Remove initSingleton(boolean) calls in code and test!
+++
Fix SharedResourceRunner 'dead' thread (Applets)
In Applets, stopping an Applet makes the browser Java plugin interrupting
and killing all related threads, including our SharedResourceRunner thread.
- Validate whether the shared resource thread is alive
- Catch interruption in shared resource thread and assume it's a kill signal
- releaseSharedResource: clear devicesTried set
|
|
|
|
|
|
|
|
|
|
| |
> 0: UP
< 0: DOWN
See MouseEvent.getWheelRotation() for details.
OSX/Windows: Default to wheel 'button' 1
OSX: Properly report '<0'
X11: Synthesize wheel events by mapping buttons 4/5 and 6/7 to wheel 1 and 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Management
- Leave Platform, .. TempJarCache untouched.
- GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched,
for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency.
- SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory
- COMPLETE: additionally shutdown GLContext*
Clear all cached GL/GLX proc-address and device/context mappings.
- Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets
- X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources.
- JAWTWindow.destroy(): Close the delegated device.
In case it's X11 this closes the exclusive opened X11 Display.
|
| |
|
|
|
|
| |
JNILibLoaderBase addNativeJarLibs(..)
|
|
|
|
|
|
| |
RegisteredClassFactory: Reference the factories itself instead of the RegisteredClass.
This enables the shutdown hook to clear the factories state,
which is required for proper recreation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
lifecycle.
Applet 'restart' (init.start.stop.destroy .. init.start...)
didn't work on Windows browsers (Firefox, Safari, Chrome, ..) w/ JVM 6u26..6u29.
It seems that after destroy we loose the ClassLoader already (plugin2)
hence we need to bind to the native resources again.
Solution is to map the JOGL lifecycle of GLProfile [initSingleton()..shutdown()]
to the Applet's [init..destroy].
|
|
|
|
| |
reached, ie not successfully changed mode.
|
|
|
|
|
|
|
|
|
| |
- Native invocation of positionChange(x,y) uses screen coordinates of client area.
Manual invocation shall respect the semantics - hence calling super.positionChanged w/ client coords.
- getLocationOnScreenImpl() shall return the screen coordinates of the client area
- Use getTopLevelLocationOnScreen(), ie substract Insets of getLocationOnScreenImpl()
|
|
|
|
|
|
|
|
| |
getLocationOnScreenImpl
Since the MacWindow position needs to be changed in concert with the parent,
we need to be triggered to update ours. AWTParentWindowAdapter issues 'updatePosition()'
if DriverUpdatePosition is implemented.
|
|
|
|
|
|
|
| |
(position)
DriverUpdatePosition:
Interface tagging driver requirement of absolute positioning, ie. depend on parent position.
|
|
|
|
| |
c26d6005e1fe74e9aee01d9d72942f566884fcd2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NEWT XDisplay Locking
Revert X11Screen RANDR commit 8cecd0c2963d982aa119cbb07698e56b9c271188,
ie. use default 'render' display connection, best results on Ubuntu, Solaris, CentOS (no failures).
Revert X11Util (XInitThreads/XLockDisplay) rational logic, commit 0314be79a7a93931a74fe4322bc78e699d7741e9,
X11Util.HAS_XLOCKDISPLAY_BUG:=true and X11Util.XINITTHREADS_ALWAYS_ENABLED:=true.
Which enables always utilizing XInitThreads() either before or after AWT initialization,
as well as disable all XLockDisplay/XUnlockDisplay locks.
Rever NEWT XDisplay X11 basic Locking commit 50100b85ce5fde48788efbc2211b26fb9d7c9dfd,
ie use null locking if X11Util.HAS_XLOCKDISPLAY_BUG and X11Util.XINITTHREADS_ALWAYS_ENABLED.
|
| |
|
|
|
|
|
| |
We shall lock a level above due to differentiation of XLockDisplay/RecursiveLock
using X11/AWT ToolkitLock.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Due to Display's reusage and hence concurrent involvement in off-thread animation,
the X11 default lock is required.
In case you require 2 GLWindow's w/o interference to each other (ie. locking),
you need to use separate Display instances.
|
| |
|
|
|
|
|
|
| |
- WindowImpl exposes private non-delegated GraphicsConfiguration,
- which is being used by GLWindow's wrapped NativeWindow instantiation (eg: AWT driver)
- Fix NewtFactoryAWT.getNativeWindow() use AWTGraphicsConfiguration.create(..)
|
| |
|
|
|
|
| |
constructor
|
|
|
|
| |
AWTDevice: Remove subtype
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow X11AWTGraphicsConfigurationFactory
X11AWTGraphicsConfigurationFactory properly construct a AWTGraphicsConfiguration
encapsulated a native X11GraphicsConfiguration, now available for non JOGL modules, ie NEWT.
AWTGraphicsConfiguration's create() utilizes the X11AWTGraphicsConfigurationFactory
via the generic factory mechanism and hence allows encapsulating a native [X11]GraphicsConfiguration.
NewtCanvasAWT creates/destroys the JAWT NativeWindow on addNotify/removeNotify (reparentWindow) again.
Hence the JAWTWindow is instantiated completly only, instead of utilizing updateConfiguration(..),
which simplifies the mechanism.
|
|
|
|
|
|
|
|
|
|
|
| |
AbstractGraphicsConfiguration, if delegation is used.
This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration()
to NativeSurface implementations and hence reduces complexity.
NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration
is controlled via get/set method avoiding flawed usage (read/write), since read access shall
return the delegated AbstractGraphicsConfiguration, if used.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- MacWindow/OffscreeSurface
- Exclude native NEWT window calls in case it's an offscreen surface
- MacWindow/DriverClearFocus
- Introduce driver detail DriverClearFocus interface
- OS X needs to clear the focus, before another TK (eg. AWT) can claim it's (native parent window focus)
- MacWindow/KeyCode:
- Move OS X keyCode utils to MacKeyUtil
- MacKeyUtil now uses OS X virtual key codes first, before matching keyChar -> keyCode
- NewtCanvasAWT
- Issue all AWT 'requestFocus()' on current thread,
Newt-EDT -> AWT-EDT may freeze Window's native peer requestFocus() impl.
- FocusAction directly issue action on Newt-EDT,
also request AWT focus if not having it (proper AWT traversal)
- Add an FocusPropertyChangeListener, detecting focus lost
to issue DriverClearFocus's clearFocus() if available.
- merge configureNewtChildInputEventHandler() code into configureNewtChild()
to simplify call tree.
- WindowImplAccess: Use getDelegatedWindow()
|
|
|
|
| |
deadlocks and simplify call-tree
|
|
|
|
| |
delegate (ie GLWindow)
|
| |
|
|
|
|
| |
- need to set setFocusable(true) manually due to z-order (newt child upfront)
|