| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
NativeWindowFactory added nonAWT ToolkitLock create method
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6
- Workaround in TestGLWindows01NEWT: same create/destroy order
- Prove bug with simple native test app: jogl/test/native/displayMultiple02.c
Misc:
- Reverted d52181032830acdd5e4069a41ccd0daff5922d8a, ie reenable x11IOErrorHandler (nativewindow)
- GLDrawableHelper: methods -> final
- X11Util.NamedDisplay: remove unused RecursiveLock, Cloneable
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New type definition:
ScreenMode { MonitorMode { SurfaceSize { Resolution, bpp }, ScreenSizeMM, refreshRate }, rotation },
where Resolution and ScreenSizeMM are of type DimensionReadOnly
- ScreenMute instance is
- immutable
- hashable
- cloneable
The above allows fast query and storage w/o redundancies.
More than 300 modes via permutation could be expected.
ScreenMode impl. changes:
ScreenImpl:
To be implemented methods by native specialization:
- protected int[] getScreenModeFirstImpl()
- protected int[] getScreenModeNextImpl()
- protected ScreenMode getCurrentScreenModeImpl()
- protected boolean setCurrentScreenModeImpl(ScreenMode screenMode)
The data unification etc is implemented generic using ScreenModeUtil
and the 'int[]' streaming.
ScreenModeStatus holds all ScreenMode related data
and provides a locking strategy.
ScreenModeListener provides a callback facility for ScreenMode change events.
- Screens listen to ScreenModeStatus, so all FQN referenced Screen's receive the change.
- Windows listen to Screen, to take appropriate action for the event (fullscreen, reshape).
Misc:
- Screen/Display: promoting 'addReference'/'removeReference' to public interface,
so a user may trigger construction/destruction (-> junit tests, plus other clients than WindowImpl).
- Gears: 'setSwapInterval' at 'reshape' instead of 'init',
so it's reset when ScreenMode is changing.
-
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
18bf27fa86da1f26fd085565f501736816d2f2e9
Conflicts resolved:
src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
src/newt/native/WindowsWindow.c
src/newt/native/X11Window.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- setSizeImpl/setPositionImpl/reparent -> reconfigureWindowImpl
- setVisible(boolean) is state checked (500ms) for better reliability
on resource creation. Guarantees valid surface.
- reparentWindow: start pos of child -> top is current position on screen
- reparentWindow: Recheck success (setVisible), if failed fall back to recreate,
which gets rid of a lost child windows (1/20) ..
- reparentWindow: if size failed, reconfigure for size again
- add toggle decoration
- unify nfs_ size/pos state
- WindowsWindow.c/X11Window.c: Unify size/pos settings
- X11Window.c:
- NewtWindows_setFullscreen: use 'root of screen' instead of 'default root of display'
- Adding SubstructureNotifyMask incl event semantics
- Parse ReparentNotify (debugging of reparenting)
Misc:
- Add native getLocationOnScreen() impl to avoid possible AWT deadlock
- setSize/setPosition/setFullScreen -> EDT
- More documentation on expected native implementation semantics
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Event of fullscreen is sent to the display root
and properties of fullscreen are set on our window/screen
defined source attachment of data sent using XSendEvent to be normal application (required)
cleaned up the code. replaced tabs with spaces
|
| | |
| | |
| | |
| | |
| | | |
when true the request is send after configuring the window
otherwize before decoration. needs tweeking to ensure that the fullscreen is on-off
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added windows implemenation for screen mode change lifecycle and screen rotation
screen modes.
+++++++++++
Added getHighestAvailableRate() to Screen mode as a helper function
which loops over the available rates of this screen mode and returns the
highest available.
Added toString impl to ScreenMode.
+++++++++++
Unit Tests: TestScreenMode01NEWT,TestScreenMode02NEWT are modified adding the gears as GL
event listeners.
+++++++++++
Notes:
1- Screen modes with bits per pixel values not same as current are currently filtered out.
2- Since windows stores the Display settings differently you will see some duplicate values
which the documentation says is usual. These modes are not filtered out in getScreenModes().
Keeping values same as provided from windows enum.
3- BitsPerPixel is currently natively read on windows only.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added screen rotation change capability with impl for X11 (using Xrandr)
com.jogamp.newt.Screen: added 2 methods which cover screen roation lifecycle
setScreenRotation(int rot): Change the Screen Rotation to
one of the rotations defined in ScreenMode, namely:
ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
int getCurrentScreenRotation(): Get the Current screen rotation
returns -1 if not implemented natively.
+++++++++++++++++++++++++
Notes:
1- At init the original rotation is called natively and cached,
when screen is destroyed the rotation is reverted.
2- On X11 with Nvidia: you need to edit /etc/X11/xorg.conf:
Add the following line:
Option "RandRRotation" "on"
in Section "Device" after BoardName.
+++++++++++++++
Added TestScreenMode02NEWT which includes 4 tests
1- Rotate 90
2- Rotate 180
3- Rotate 270
4- Rotate with screen mode change
should fail if screen rotation not implemented natively.
(4) withh fail if screen mode not impl natively as well.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added screen mode change capability with impl for X11 (using Xrandr)
com.jogamp.newt.Screen: added 4 methods which cover screen mode lifecycle
ScreenMode[] getScreenModes(): Get list of available screen modes
returns null if not natively implemented. On first call
will fetch the list thru a set of native calls and stores them
in the ScreenModeState. Consequent calls will retreive the data
from the ScreenModeStatus object. Native calls are done on creation stage,
so subsequent API calls will return cached data.
int getDesktopScreenModeIndex(): Get the Current Desktop Screen mode index
returns -1 if functionality not natively implemented. The index
returned refers to the screen mode location in the ScreenMode array.
Used to get initial mode for reverting back. Initial call will retreive the
mode thru a native call (done on initialization), subsequent API calls will retreive it
from the ScreenModeStatus object.
Note: If Window is closed without reverting back and screen is set to unreachable.
The api will revert the screen. A call to destoy(unreachable) is needed
for revert to take place on close
windowDestroyNotify(WindowEvent e) {
...
window.destroy(true);
}
short getCurrentScreenRate(): Get the current screen rate
returns -1 if not natively implemented. Used along with getDesktopScreenModeIndex
You can identify the current screen mode (w x h) and the rate. Initial call will retreive the
mode thru a native call (done on initialization), subsequent API calls will retreive it
from the ScreenModeStatus object.
void setScreenMode(int modeIndex, short rate): change the screen mode
to the mode index which refers to one of the screen modes retreived by getScreenModes()
and a rate which can be one of screenModes.getRates(). If the rate provided doesnt belong
to the list of available rates the first rate is chosen.
build-newt.xml: Added header files generation for Screen and Display
Added Xrandr syslink to x11 based builds.
+++++++++++++
Fullscreen for X11Window:
Added Fullscreen WM Hint for X11Window. Event of Fullscreen is
sent to the display root. When changing to fullscreen the request is send
after configuring the window otherwize before decoration.
Not Stable yet, needs tweeking on other Linux dist. Window looses focus
after switching to fullscreen mode.
+++++++++++++++
Added TestScreenMode01NEWT which includes 4 tests
1- Fullscreen change mode
2- Screen mode change
3- Screen change with fullscreen (revert screenmode then revert fullscreen)
4- Screen change with fullscreen (revert fullscreen then revert screenmode)
should fail if not screenmode not implemented on platform.
+++++++++++++++
Cleaned up some unused imports
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
them).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
(ConcurrentModificationException) - 2 - Use volatile barrier
|
| |
| |
| |
| | |
(ConcurrentModificationException)
|
| |
| |
| |
| | |
the threaddump
|
|/ |
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
pending creation
NEWT/AWT: TestParenting03AWT use Container and add delay in addNotify(2nd-gl-element);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
& 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
|
|
|
|
| |
(wait-interrupt) using a LinkedList
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
- 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
- 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
- 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()
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
otherwise multiple parallel tests will render the result invalid
|
|
|
|
| |
otherwise it may cause deadlock (AWT EDT)
|
| |
|
|
|
|
|
|
|
|
| |
NEWT Focus fixes:
WindowImpl.setFocusAction():
fix (was never set)
NewtCanvasAWT.FocusActionImpl:
KeyboardFocusManager.clearGlobalFocusOwner() after requestFocusAWTParent()
|
|
|
|
| |
temp loss) - instead test focus with key input.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
on an AWT device. Wait until TO or event received.
|
|
|
|
|
|
| |
- Window add focus tracking and query via hasFocus()
- TestTransformFeedbackVeryingsBug407NEWT allow fail if no GL3 is available
- TestFocus01SwingAWT check on NEWTChild focus
|