| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
hashCodeComputed := true (always re-computes hash code - duh!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conversion Utilities (Allowing 'arbitrary' PointerIcon data input)
Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities,
utilized and further tested by this patch.
+++
- PointerIcon is a PixelRectangle
and hence holds the decoded data.
This allows on-the-fly conversion if required
as well as recreation w/o PNG re-decoding.
- Using array-backed PointerIcon data where possible,
allowing better performance when converting PixelFormat etc.
- NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...'
method to support agnostic PointerIcon creation.
- NEWT Display adds methods to allow users to avoid PixelFormat and
Buffer NIO type forced conversion:
- PixelFormat getNativePointerIconPixelFormat()
- boolean getNativePointerIconForceDirectNIO()
+++
PNGImage -> PNGPixelRect
Deleted: com.jogamp.opengl.util.texture.spi.PNGImage
Added: com.jogamp.opengl.util.PNGPixelRect
(We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO)
PNGPixelRect is a PixelRectangle
PNGPixelRect actually is implemented OpenGL agnostic,
however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj'
it cannot be moved up (yet).
PNGPixelRect now handles all PixelFormat for the target format
and also added support for grayscale+alpha (2 channels).
The latter is force-converted to RGB* - similar to paletted.
Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data.
Used by: TextureIO and NEWT
+++
- OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle
instead of a PNG resource.
- AWTMisc uses the PixelRectangle to produce the AWT Cursor
and converts it to the required format.
Hence same pixels are used for NEWT and AWT pointer/cursor icon.
- TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests'
iterate over 3 custom PointerIcon when pressed 'c'.
- JOGLNewtAppletBase uses the new custom PointerIcon
'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only).
-
|
|
|
|
|
|
|
|
|
|
| |
Utilities (Allowing 'arbitrary' PointerIcon data input)
To allowing 'arbitrary' PointerIcon data input, i.e. via raw pixels
we need to define an agnostic PixelFormat and required conversion utilities.
The latter is not hw accelereated (toolkit agnostic), but this shall be expected
and satisfying for small amount of 'pixels'.
|
|
|
|
|
|
|
| |
OffscreenLayerSurface PointerIcon/Visibility tasks async on AWT-EDT
setCursor(..) and hideCursor(..) must happen on the AWT-EDT w/o blocking,
otherwise we may deadlock the NEWT-EDT.
|
|
|
|
|
|
|
|
| |
(NativeWindow GDI / NEWT )
.. this allows using the icon definition of WNDCLASSEX instead of setting them at CreateWindow0(..).
- NativeWindow GDIUtil/RegisteredFactory uses WNDCLASSEX and Small/Big Defailt Icons
|
|
|
|
|
|
|
|
|
|
| |
OffscreenLayerSurface (OSX CALayer) w/ JAWTWindow Path
Add setCursor(..) and hideCursor() to OffscreenLayerSurface interface,
impl. in JAWTWindow w/ AWT.
This allows an OSX NEWT Window using CALayer (i.e. NewtCanvasAWT)
to have setPointerIcon(..) and setPointerVisible(..) functionality!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
visibility state not restored @ detach
Commit ebed9f0322e2a2279a525e04ee3875c9034a7f45 (fix for Bug 906) causes a regression
to fix for Bug 816, Bug 849 and Bug 889 (OSX CALayer Positioning and JAWTWindow visibility).
The commit adds the JAWTComponentListener instance 'jawtComponentListener'
to the component before it's assignment (duh!).
+++
Further more, detaching the JAWTComponentListener shall restore
the component's original 'local visibility state', which might got overridden
by it's 'hierarchyChanged' implementation.
+++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in RegisteredClass; Safe DDT Post/WaitForReady handling and error cases ; ...
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.
|
|
|
|
| |
52c95c19dbd69a7fc6b307d2b2db357ceb43ddf5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
try to retrieve window names
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
AWTRobotUtil.waitForRealized(..) removed 2nd 'glad.isRealized()' loop ..
|
|
|
|
| |
properly removeClosingListener() (and replace boolean state)
|
|
|
|
|
|
|
|
|
|
| |
JAWTWindow.destroy() - GLCanvas Recreation Case
In case a JAWTWindow owner recreates itself, destroying JAWTWindow must detach the
Component- and HierarchyListener from the AWT component!
Test TestBug816GLCanvasFrameHoppingB849B889AWT
shows properly detaching listener at jawtWindow destruction.
|
|
|
|
|
|
|
|
|
| |
moves between two JFrame
When JAWTWindow's visibility tracker updates component's local visibility,
it should read it's local visibility state instead 'trusting' the passed state.
Make JAWTWindow's visibility tracker DEBUG output more brief for readability.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'getDummyWndProc0()' in RegisteredClassFactory - Result: Yes we do.
GDI.initSingleton() dummyWindowClassFactory RegisteredClassFactory[moduleHandle 0x13f3e0000, _dummyWindow_clazz, wndProc 0x6c101de6, shared[refCount 0, class null]]
GDI.CreateDummyWindow() dummyWindowClassFactory RegisteredClassFactory[moduleHandle 0x13f3e0000, _dummyWindow_clazz, wndProc 0x6c101de6, shared[refCount 1, class RegisteredClass[handle 0x13f3e0000, _dummyWindow_clazz0]]]
GDI.CreateDummyWindow() dummyWindowClass RegisteredClass[handle 0x13f3e0000, _dummyWindow_clazz0]
++
Note: The RegisteredClassFactory mechanism is used for NEWT Windows as well.
|
|
|
|
| |
for analysis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(again) on 'addNotify(..)' - GLCanvas in JtabbedPane disappear
Regression of commit e33e6374e0be0454f7e9732b5f897f84dbc3c4dc (Fix for Bug 729 and Bug 849) !
+++
JAWTWindow's HierarchyListener doesn't set component visible (again) on 'addNotify(..)'
It only renders the component invisible after removeNotify() which is performed implicit anyways ..
Case java.awt.event.HierarchyEvent.DISPLAYABILITY_CHANGED
shall perform similar as our java.awt.event.HierarchyEvent.SHOWING_CHANGED impl.
+++
Tested on Gnu/Linux X11 and OSX incl. re-test Bug 729 and Bug 849 unit tests.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|