| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
commit:
a4e3f241cfba55e407c68eba91ffcc4beb0758b5 (Analysis of glXMakeCurrent freeze on ATI fglrx 8.78.6; Misc ..)
Removed 'implements Clonable' from NamedDisplay, which means Object.clone() will
always throw CloneNotSupportedException. Kill clone().
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
|/
|
|
|
|
|
|
|
|
| |
DEBUG_CALAYER_POS_CRITICAL is explicitly set.
- DEBUG_CALAYER_POS_CRITICAL = nativewindow.debug.JAWT.OSXCALayerPos
Since AWT's location-on-screen query can cause an AWT deadlock,
which is the sole purpose of our custom lock-free impl,
don't enable it's DEBUG output w/ default DEBUG flags.
|
|
|
|
|
|
|
| |
One String is already being built, passing it to new String() is just wasteful as
the temp String can be returned just as easily.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
NativeWindow's util types.
|
|
|
|
| |
allowing user to set custom tile size for performance evaluation/tweak
|
| |
|
|
|
|
| |
via onMain && ( isOnMain || 0 < delay )
|
|
|
|
|
|
|
|
|
|
|
|
| |
JAWTWindow snoops HierarchyEvents for SHOWING_CHANGED to
track local component's visibility state as well as it's global visibility state.
The later is determined by it's parent's visibility change.
If 'removeNotify()' is called, component's visibility is reset to it's local visibility state.
Fixes OSX CALayer component's visibility if parent's visibility changes (Bug 729).
Fixes continuous GL rendering if parent is invisible (Bug 849).
|
|
|
|
|
|
|
|
| |
component.
Completes commit 3b02a219b1b9e446e87df1beb7da4266f74824fa
See unit test: TestBug816OSXCALayerPos03AWT
|
|
|
|
|
|
|
|
|
|
| |
top-level heavyweight Window, fixes [J]Dialog use case.
Top-level heavyweight Window's position is it's position on screen, hence stop traversing.
Thx to Emmanuel Puybaret for pointing this out.
Adding Dialog and JDialog unit tests as inspired by Emmanuel Puybaret.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A once visible CALayer (GLCanvas) must be able to become invisible w/o destruction,
e.g. as required by CardLayout's switching cards.
See unit test for Bug 532: 'TestAWTCardLayoutAnimatorStartStopBug532'
Out native 'fixCALayerLayout(..)' takes the visible state as tracked by JAWTWindow's ComponentListener
and sets our CALayer (root and sub) hidden state accordingly.
Now MacOSXJAWTWindow's layoutSurfaceLayerImpl(..) always calls down to 'fixCALayerLayout(..)'
due to update the visibility state.
|
|
|
|
| |
JAWTUtil.JAWT_OSX_CALAYER_QUIRK_LAYOUT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'inner CALayer' is the outter AWT Window client space (content).
+++
Pseudo-Code:
p0 = c.locationOnScreen();
p0 -= c.getOutterComp.getPos();
p0 -= c.getOutterComp.getInsets();
Where 'locationOnScreen()' is:
p0 = 0/0;
while( null != c ) {
p0 += c.getPos();
}
+++
JAWTWindow.getLocationOnScreenNonBlocking(..) validated against
AWT's Component.getLocationOnScreen() - OK for all use-cases.
(Validation enabled w/ DEBUG)
All unit tests manually validated on OSX 10.7 w/ jdk7u40.
|
|
|
|
| |
JAWT_OSX_CALAYER_QUIRK_LAYOUT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JRootPane for last position offset; AWTMisc.getInsets(..) add special JRootPane case.
Please note that we use JAWTWindow.getLocationOnScreenNonBlocking(..) to determine the
location on the screen 'only' b/c we cannot allow AWT to aquire the tree-lock!
The latter would be the case if using AWT's 'getLocationOnScreen()'.
If anybody has a more reliable implementation to achieve the same .. please provide your patch!
The following fix has been performed to fix the last issue w/ vZome.
- JAWTWindow.getLocationOnScreenNonBlocking(..) shall use JRootPane for last position offset
- w/ vZome, the frame's position was 0/0 (invalid), instead JRootPane's position is good.
Use JRootPane's position and stop traversing here (LW top-level).
- AWTMisc.getInsets(..) add special JRootPane case.
+ * Exception is JRootPane.
+ * Return it's parent's Window component's insets if available,
+ * otherwise return JRootPane's insets.<br>
+ * This is due to <i>experience</i> that <i>some</i> JRootPane's
+ * do not expose valid insets value.
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
position from AWT component's location on screen. Track fixedFrame size of root CALayer; Add Split layout to unit test, add [manual] Applet tests.
- Fix JAWTWindow's getLocationOnScreenNonBlocking()
Skip JRootPane while traversing up to root Container.
JRootPane would duplicate the top-level container's offset (Window insets).
- Derive CALayer position from AWT component's location on screen. Add Split layout to unit test, add [manual] Applet tests.
AWT >= 7u40:
- AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets.
- Use getLocationOnScreenNonBlocking() to get location-on-screen w/o insets.
- Native code: flip origin
AWT < 7u40 still uses fixed position 0/0 for root and sub layer.
- Track fixedFrame size of root CALayer - MyCALayer:
- Override layoutSublayers to validate root and sub-layer pos/size
- Override setFrame to use fixedFrame, if set (similar to MyNSOpenGLLayer)
- Add Split layout to unit test, add [manual] Applet tests.
- Thx to 'jimthev' and 'Manu' for providing Applet unit tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of component-count, support all int types ; Add type 'BufferedImageInt' preserving the custom image-type, add note about TYPE_CUSTOM
- createBufferedImage(..) use BufferedImage type value instead of component-count, support all int types
- Support all integer data image-type, hence we need to pass image-type instead of component count (collision).
- Also pass 'properties' to allow configuring all BufferedImage parameters (just in case)
- Return BufferedImageInt to allow user to query the used image-type, see below.
- Add type 'BufferedImageInt' preserving the custom image-type, add note about TYPE_CUSTOM
- Simply extends BufferedImage w/ custom image-type, since BufferedImage's type is TYPE_CUSTOM
due to our custom storage type (see API doc comment).
Unit tests:
- Testing all integer image-type's in
- TestTiledPrintingGearsSwingAWT
- TestTiledPrintingNIOImageSwingAWT
- Disable all AA print-hints, all AWT text visible on X11.
Probably has a regression on Windows / OSX .. TBD.
|
|
|
|
|
|
| |
as well)
Regression of commit 4b5435c68c3f12d62dadb395957362eceacfb25c
|
|
|
|
|
|
|
|
|
| |
JAWT_OSX_CALAYER_QUIRK_SIZE and JAWT_OSX_CALAYER_QUIRK_POSITION.
- Provide quirk bits for OSX CALayer depending on used JVM/AWT
and act accordingly.
- TestBug816OSXCALayerPosAWT: Add resize by frame
|
|
|
|
|
|
|
|
|
|
| |
- Contains convenient method to create an NIO backed BufferedImage
'BufferedImage createBufferedImage(int width, int height, int numComponents, Point location)'
Standalone test TestTiledPrintingNIOImageSwingAWT 'prints', i.e. renders offscreen,
the Frame into
- a traditional array-backed BufferedImage
- an NIO-backed backed BufferedImage
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AWTPrintLifecycle's lifecycle
- AWTPrintLifecycle:
- Should decorate:
PrinterJob.print(..),
instead of within Printable.print(..) { .. container.printAll(..); .. }
This is due to AWT print implementation, i.e.
AWT will issue Printable.print(..) multiple times for 'overlapping'
or non-opaque elements!
- Move from javax.media.opengl.awt -> com.jogamp.nativewindow.awt
- Make _interface_ AWT agnostic, i.e. remove Graphics2D from 'setup(..)'
- Add 'int numSamples' to 'setup(..)' to determine the number of samples
- AWTTilePrinter:
- Use double precision when scaling image-size and clip-rect,
then round them to integer values.
Otherwise AWT will use the bounding box for the clipping-rectangular.
- Clip negative portion of clip-rect,
this removes redundant overpaints, as well as increasing the tile count
due to the increased clipping-size.
- Clip the image-size in the tile-renderer according to the clip-rect.
- DEBUG_TILES: Dump tiles to file
- Use sub-image of final BuffereImage instead
of adding another clipping region. This might increase performance
if no clip-rect has been set.
TODO:
TestTiledPrintingGearsSwingAWT overlapping tests exposes
a 'off by one' bug of the first layer's background!
Note: The GL content seems to be correct though - maybe it's simply an AWT rounding error ..
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and convenient AWT container traversal context; GLCanvas/GLJPanel properly handle existing MSAA and req. AA;
- Test: Don't resize frame, tweek print-matrix
- Use scaleComp72 to scale the frame to fit on page,
i.e. global print matrix
- Use scaleGLMatXY = 72.0 / glDPI
to locally scale on the GL drawable as being passed to AWTPrintLifecycle.setup(..)
- Hence frame stays untouched/stable, no need for 'offscreen' print test,
which is removed.
- AWTPrintLifecycle: Add scale and convenient AWT container traversal context
Use a simple decoration for all AWTPrintLifecycle impl. components within a container:
final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(frame, g2d, scaleGLMatXY, scaleGLMatXY);
try {
} finally {
ctx.releasePrint();
}
- GLCanvas/GLJPanel properly handle existing MSAA and req. AA;
- GLCanvas: Workaround bug where onscreen MSAA cannot switch to offscreen FBO,
i.e. stay 'onscreen'
- GLJPanel: Use new offscreen FBO if MSAA is requested and not yet used.
- GLJPanel.Offscreen.postGL(): always swapBufer(), was missing for !GLSL swapping
Results GLCanvas / GLJPanel:
- Good scaling
- Stable behavior / visibility
- High DPI mode works
|
|
|
|
| |
'addNativeJarLibsJoglCfg(..)' to GlueGen, commit c0ead6fa10280f8076704726d59f482b183fd77e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class.
Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to
'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization.
Iff that happens, an AccessControlException may happen, due to requesting an insecure property,
since modules own Debug class has not been added it's trusted prefixes from within it's init block yet.
This seems to be a bug of the JVM .. to me, however .. the above description is the only
able to explain the issue at hand.
+++
Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(),
before calling 'isPropertyDefined(propName, default)'.
+++
Also mark Debug class static methods final!
+++
|
| |
|
|
|
|
|
|
|
|
| |
UITestCase's AfterClass if available (X11).
In case a MonitorMode test case fails, force XRandR reset '-s 0 -o normal' at end of test class if X11.
Unit Test: TestScreenMode00cNEWT
|
|
|
|
|
|
|
|
|
|
|
| |
MonitorMode* ; Sort List<MonitorMode> in descending order to be well determined.
Add Comparable<?>: Point*, Dimension*, Rectangle*, SurfaceSize* and MonitorMode*:
- Compare square values
- See API doc for order of special semantics (flags, rotation, ..)
Sort List<MonitorMode> in descending order to be well determined:
- Removes order by native mode id, give user a reliable natural order.
|
|
|
|
| |
component method.
|
|
|
|
|
|
|
|
|
|
|
|
| |
70bf3a4ec44504b86294a332255aaae8d2e86bf4 was not sufficient.
Commit 70bf3a4ec44504b86294a332255aaae8d2e86bf4 did not work out on Windows.
Solution now gathers the next or previous 'to be focused' component,
using the FocusTraversalPolicy of the visible/focusable/enabled container.
Then we simply request it's focus.
Works w/ Java7 on Linux and Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindowFactory.shutdownHook, the latter handles customShutdownHooks for NativeWindow, JOGL and NEWT.
Unifying our shutdown mechanism is required to provide a controlled shutdown sequence.
NativeWindowFactory is chosen to be the new central entry point, since it is the lowest denominator (common module).
- Move GLDrawableFactory.shutdownHook -> NativeWindowFactory.shutdownHook
Reverse the shutdown dependency for clarity and availability to all modules,
i.e. NEWT may not know about JOGL.
Remove the 'gamma' shutdown hook,
instead simply call GLDrawableFactoryImpl.resetDisplayGamma() before destroy.
NativeWindowFactory.shutdownHook handles customShutdownHooks for NativeWindow, JOGL and NEWT
- Modules can register their shutdown runnable at head or tail of list.
- Allows controlled shutdown across all modules.
|
|
|
|
| |
reorder globalLock/isJVMShuttingDown branch/sync
|
|
|
|
| |
@ addNotify() w/o newtChild
|
|
|
|
|
|
|
|
|
| |
Usually, the environment variable DISPLAY is used to define the default
display under X11. There are cases where the default display has to be
defined or overridden programmatically. For those cases, the new system
property nativewindow.x11.display.default can be used (as environment variables can't
be changed in Java). Its semantics are identical to the DISPLAY
environment variable.
|
|
|
|
|
|
|
| |
(dummy) and NEWT
Free the colormap at WindowDestroy, which we have created at WindowCreate w/ AllocNone.
Due to the fact we used 'AllocNone' the leak is minimal though ..
|
| |
|
|
|
|
|
|
| |
AbstractGraphicsDevice.getUniqueID() and GLContext.getDeviceVersionAvailableKey()
.. both value classes unique, long lived and rare.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Support for all monitor devices and their available modes
- X11: Use RandR 1.3 if available
- Retrieve information
- Changing a monitor device's mode
- Support for dedicated and spannig fullscreen
- See <http://jogamp.org/files/screenshots/newt-mmonitor/html/>
- TODO:
- X11 RandR does _not_ relayout the virtual screen size
and neither the CRT's viewport.
We may need to relayout them if they were covering a seamless region
to achieve same experience!
- OSX: No machine to attach a secondary CRT -> TEST!
- Tested Manually for Regressions
- Linux ARMv6hf (Rasp-Pi/BCM, Panda/X11)
- Android (Huawei, Kindle)
- Tested Manually and junit:
- X11/Linux
- NV, ATI-Catalyst w/ 2 CRTs
- VBox w/ 4 CRTs
- Win/Windows
- NV, w/ 2 CRTs
- VBox w/ 4 CRTs
- X11/OpenIndiana, NV, 1 CRT
|
|
|
|
|
|
|
|
| |
when calling wglCreateContextAttribsARB (Windows)
See discussion at
https://jogamp.org/bugzilla/show_bug.cgi?id=520
https://jogamp.org/bugzilla/show_bug.cgi?id=706
|
|
|
|
| |
through errorHandlerQuiet state.
|
|
|
|
| |
lock instead of simple volatile fields (bug).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
surface.lock[ modify ] ]
GLEventListenerState:
New model for GLEventListenerState's transaction safety:
- Z Decorate-1: Animator.pause [ X ] Animator.resume
- X Decorate-2: Surface.lock [ Y ] Surface.unlock
- Instead of setting AbstractGraphicsDevice, just swap the handle and ownership.
- Issuing setRealized(..) only if required, i.e. having an upstream-surface (EGL..) depending on used device
- Utilizing setRealized(..) on the GLAD's delegated 'real' drawable, avoiding optional GLAD locking.
- Cleanup and above changes shall render impl. easier to read.
GLEventListenerState Unit Tests:
- If swapping/moving from AWT -> NEWT, use a NEWT dedicated Display
avoiding ATI driver XCB crash - read comment.
|
|
|
|
| |
getExclusiveWinAttributeBits(..); WGLGLCapabilities: Add PFD2String(..)
|