| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This prepares proper release of the acquired NativeSurface lock to cure the missing CGLContext lock, see followup commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
native DPI toolkit aware platforms (Linux, Windows)
NEWT + NewtCanvasAWT:
Maybe create "interface ScalableSurface.Upstream {
void pixelScaleChangeNotify(final float[] curPixelScale, final float[] minPixelScale, final float[] maxPixelScale); }"
to allow downstream to notify upstream ScalableSurface implementations like NEWT's Window to act accordingly.
+++
AWT GLCanvas: Add remark where to add the potential pixel scale.
|
|
|
|
| |
input if not visible.
|
|
|
|
|
|
|
|
| |
NewtCanvasSWT.SWTNativeWindow's surfaceSize in pixel units
shall only return scaled-up windowUnits using SWTAccessor.deviceZoomScaleUp(..) for !OSX
and potentially auto scaled-up pixelUnits to passthrough (OSX).
See detailed API doc to NewtCanvasSWT.newtScaleUp(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compensation like 'DPIUtil.useCairoAutoScale()'
We can't use DPIUtil's 'autoScaleUp(..)' method on non-native DPI scaling platforms
as it uses a scale-factor of 1f if the higher toolkit compensates, i.e. 'DPIUtil.useCairoAutoScale()'.
Since NEWT uses X11 and GDI directly, which are not DPI scale-aware,
we have to drop the semnatics of 'DPIUtil.useCairoAutoScale()'
and merely use the actual 'deviceZoom'.
This was proposed by Marcel Au in the first place.
At least I understand these semantics by now.
+++
Additionally NewtCanvasSWT.SWTNativeWindow needs to return the 'deviceZoomScaleUp(..)'
values for returning its size in window- and pixel-units (surface).
|
|
|
|
|
|
|
| |
toString(..), added toSimpleString(..)
This also revised commit f56adf14deadd4ee8f434ea1293e27bcafdf2a90 Window API addition of 'append(StringBuilder)',
which has been renamed to 'toString(StringBuilder)' as aligned to out other classes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug 1422 shows that it seems to be desired to emulate DPI scaling where
the native toolkit does not implmement the same.
On GTK, DPIUtil.mapDPIToZoom (int dpi) reads:
double zoom = (double) dpi * 100 / 96;
int roundedZoom = (int) Math.round (zoom);
return roundedZoom;
While having dpi calculated as:
dpi = 96 * GDK.gdk_monitor_get_scale_factor(monitor);
Well, this seems to exist to allow 96 dpi fixed layout to
'look' OK on high-dpi screens.
However, you get in trouble if you layout high-dpi aware,
i.e. using percentages etc.
There is one exception: If DPIUtil.useCairoAutoScale() is true, scalingFactor is 1f
and hence the scaling emulation dropped.
'DPIUtil.setUseCairoAutoScale((sx[0]*100) == scaleFactor || OS.isGNOME);'
|
|
|
|
|
|
| |
remove all SWT listener on dispose.
Additionally print more details about the newtChild's state in DEBUG mode.
|
|
|
|
| |
building custom efficient presentations
|
|
|
|
|
| |
Show and Hide handling resolves TabFolder layout,
i.e. hiding the 'hidden' and showing the current tab.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacOS (fixes NewtCanvasSWT on SWT positioning)
Newt's OSX Window consist out of NSView wrapped up within its own NSWindow.
It's position is being set via its NSWindow's client-area position on screen (frame),
which we derive from NSView's client-area position.
When NEWT reparents into a new 'window',
on OSX it uses the parent's NSView and its NSWindow
to attach its own NSView and NSWindow as a subview and childwindow.
SWT's OSX implementation uses NSView's for each Compositor,
but an individual NSWindow is only established for the Shell (Window).
An oversight in Nativewindow and NEWT's coordinate translation:
'top-left view <-> top-left screen'
by missing the 'view <-> window' translation caused this whole issue.
The oversight occured as NEWT's 'view <-> window' translation
had no impact due to its 1-view to 1-window mapping.
Fixing the coordinate translation resolves the mess
for SWT and for potential other toolkits on OSX.
NewtCanvasSWT behaves same on OSX as on X11 etc finally.
|
|
|
|
|
|
| |
This also demonstrates that on non MacOS, SWT's scale-factor is artificially imposed
on the actual pixel-units, as SWT's getClientArea() is simply returning:
DPIUtil.autoScaleDown(getClientAreaInPixels())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getClientArea() on MacOS produces a 'difficult' result regarding the position,
which usually is returned as zero.
Using a zero position issues the bug w/ SashForm, where the offset doesn't seems
to be covered by the native NSView nor an SWT parent Composition.
Then using the getLocation() as is (i.e. the view's frame position)
may also cause issues with the TabFolder, as it includes the tab's trimming.
Here the native NSView 's position includes the tab's trimming,
gladly the parent (TabFolder or a Composition)'s clientArea includes this offset.
Therefor, as a testbed - on OSX, getClientArea2(..) returns
- position: getLocation() - getParent().getClientArea().position
- size: getSize()
This at least works OK'sh using
- no special layout parent
- TabFolder
- SashForm
++++
Unit test TestGLCanvasSWTNewtCanvasSWTPosInTabs: Adding 'addComposite' to test matrix.
'addComposite' wraps our GLCanvas or NewtCanvasSWT into a Composite instead of
adding it directly into the layouting parent.
It demonstrates an issue with the new test 'test32_NewtCanvasSWTTabSashGLWComp',
i.e. the NewtCanvasSWT is shown on the left as the SashForm's offset is being dropped.
Summary:
- No more issues with High-DPI pixelScale observed!
- GLCanvas is being most well layouted, no issues in tests
- NewtCanvasSWT may show severe positioning issues -> test32_NewtCanvasSWTTabSashGLWComp
- NewtCanvasSWT always shows a small positioning offset into the lower-right corner w/ overlapping
- NewtCanvasSWT overall positioning is not perfectly understood
- NewtCanvasSWT misses to hide the NEWT child when changing tabs in TabFolder
|
| |
|
|
|
|
| |
'setNEWTChild(..)'
|
|
|
|
| |
setBounds(..)
|
|
|
|
|
|
|
|
|
| |
utilize it for convertTo*Units(..)
Detected pixelScale on SWT should be propagated to the NEWT Child
using 'newtChild.setSurfaceScale(pixelScale)' to allow an impact.
Also utilize computed pixel for converTo*Units(..) implementation.
|
|
|
|
|
|
|
|
| |
pixel-units
Commit ca7f0fb61b0a608b6e684a5bbde71f6ecb6e3fe0
did one thing wrong: Using the pixel-unit size for
NEWT child window operations where window-units are required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library
DRM/GBM is enabled for Linux in general.
Nativewindow's 'nativewindow_drm' DRM/GBM native library is already seperated.
NEWT get its 'newt_drm' DRM/GBM native library.
NEWT's main head native library is renamed from 'newt' -> 'newt_head'
and is earmarked for further seperation similar to Nativewindow's.
At least a 'newt_wayland' will probably followup when support is added.
Goal is to remove DRM/GBM dependency for Linux X11 operation
as well as removing X11 dependency for Linux DRM/GBM operation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and not repositionable.
Our two fixed size and position console cases 'bcm.egl' and 'egl.gbm' (drm.gbm)
only operate in a console like fullscreen mode.
We should earmark and expose this behavior, as well as handle it by not waiting for a position / size
and not attempting to change position and size.
Reducing WindowImpl.minimumReconfigStateMask to bare minimum values:
STATE_MASK_VISIBLE | STATE_MASK_FOCUSED;
New WindowImpl.mutableSizePosReconfigStateMask extends WindowImpl.minimumReconfigStateMask, representing previous values:
STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN | STATE_MASK_RESIZABLE | STATE_MASK_REPOSITIONABLE;
All WindowDriver implementations previously using WindowImpl.minimumReconfigStateMask
are now using WindowImpl.mutableSizePosReconfigStateMask but the explicit console driver named above.
I would have liked to add the STATE_BIT_FULLSCREEN to the current stateMask to notify this semantics,
however this would have lead to more code changes as our fullscreen mode assumes to be 'on top' of the normal mode.
Here the normal mode is essentially fullscreen and no back/forth fullscreen setting is useful or allowed.
Therefore, both fixed size & position console driver won't expose themselves as being in fullscreen mode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PointerIconImpl.validatedHandle() shall not create native resource.
Semantic cleanup for clarity and equal behavior
Align DisplayImpl.createPointerIcon(..) behavior
- return null handle of createPointerIconImplChecked(..) shall be accepted,
no exception for neither of the two creation methods.
PointerIconImpl.validatedHandle() shall not create native resource.
- throws exception if handle is null (about to be used)
- no native creation shall happen here.
Display.PointerIcon.validate(): Removed, not used.
|
|
|
|
| |
must be enabled via -pointerIcon
|
|
|
|
|
| |
getCustomClass(..) shall throw all required exceptions upstream.
Previous essential NEWT driver exception information got suppressed if failing, only disclosed in debug mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
disableBackgroundErase (impl. semantics)
Commit 13c6bbbde5ea476d60e0a2f04a5172d3302d0edd simply removed the
AWT commonly used SunToolkit lock/unlock methods, which was incorrect.
It lead to certain resources access collisions as access has to be synchronized
using the same reentry lock across AWT and NativeWindow/JOGL.
We utilize the new com.jogamp.common.util.UnsafeUtil of GlueGen commit 07c1885e9a3d1f3a3853414648c06fb3864bc69f
to disable the IllegalAccessLogger while fetching the methods/fields and making them accessible.
JAWUtil also hosts access to SunToolkit's disableBackgroundAccess(Component)
aligning the code for GLCanvas, NewtCanvasAWT and AWTCanvas.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dimensions)
Christian reported this bug and described multiple pathways.
This change usese the following:
- access to getClientAreaInPixels w/ fallback of
- DPIUtil.autoScaleUp(getClientArea())
I hardly have tested this on Linux/GTK, even though I use a High DPI monitor,
maybe just because of it and Eclipse _poor_ state of proper UI presentation.
Christian: Please test this .. if buggy, reopen quick for release 2.4.0
SWT/GTK High-DPI is a PIA:
- GDK_SCALE renders offscreen and scales the image (wow & ugly)
- GDK_DPI_SCALE works at least on the fonts properly
- swt.autoScale is pretty much like: What will be scaled?
It scales some icons in Eclipse, not fonts and result in Eclipse
looks horrible.
Maybe I just made this patch to vent about this poor state of things.
Notable: KDE looks great and uses DPI, firefox some GDK_DPI_SCALE equivalent (OK)
One also wonders why there is only a single scale dimension, where DPI differs x/y!
But enough of my rant :)
|
|
|
|
|
|
|
| |
reparenting!
Bug 1362 fix or workaround: Seems SWT/GTK3 at least performs lazy initialization
Minimal action required: setBackground of the parent canvas before reparenting!
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On [GNU/Linux] X11 JFXEDTUtil is not required, since X11 can handle multi-threaded native parenting,
however, the Windows platform does require JFXEDTUtil.
Currently the default is to use JFXEDTUtil, which operates solely on the JavaFX thread
for windowing lifecycle and even-dispatch operations.
This behavior can be toggled via the boolean property 'jogamp.newt.javafx.UseJFXEDT',
which currently defaults to 'true'
This behavior might be analyzed in more detail for a fine grained EDTUtil decision.
|
|
|
|
|
|
|
|
|
|
| |
NewtCanvasJFX.NativeWindow shall pass through NewtCanvasJFX's Canvas position
to properly position the NEWT child window inside the top level Window.
NewtJFXReparentingKeyAdapter demonstrating manual reparenting demonstrates this case.
TestGearsES2NewtCanvasAWT's default behavior is to use a surrounding border
for the NEWTCanvasAWT child, similar to TestNewtCanvasJFXGLn.
|
| |
|
|
|
|
|
|
|
|
|
| |
NEWTDemoListener
NativeWindowHolder abstracts access to is-a or has-a parent component's NativeWindow
like NewtCanvasAWT, NewtCanvasJFX and NewtCanvasSWT
Adding API Doc for NEWTDemoListener.
|
| |
|
| |
|
|
|
|
|
| |
This is automatically issued when receiving the javafx.stage.WindowEvent#WINDOW_CLOSE_REQUEST
from the attached top-level JavaFX Window
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NewtCanvasJFX
NewtCanvasJFX, a JavaFX Canvas Node, allows attaching a native NEWT Window to the JavaFX Node's native Window (if attached).
The mechanism is similar to NewtCanvasAWT.
Current implementation supports placing the NEWT Window
into the JavaFX scene of the native window correctly,
as well as the following different lifecycles
- attach NewtCanvasJFX to already visible group->scene->window
- attach NewtCanvasJFX to not yet visible or attached group->scene->window
- attach NEWT Window before or after NewtCanvasJFX's visibility
The above is covered by unit test: TestNewtCanvasJFXGLn
This is the initial commit for JavaFX support and has been tested on
- OpenJDK 8 + OpenJFX 8
- GNU/Linux X11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug 1199 - Add setting to disable default window icons
Bug 1238 - Fix NPE for Window-Icon's PNGPixelRect for unresolved location, i.e. null URLConnections
Testing w/ jogl/make/scripts/tests.sh USE_BUILDDIR=1,
discloses this issue - since the icons are available in jar only.
Handling all unresolved resources, i.e. null URLConnection,
is required.
Further more, the icon list passed via property 'newt.window.icons'
shall be separated by comma as well.
This allows passing the list via scripts more conveniently.
-Dnewt.window.icons="newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png"
+++
Bug 1199 - Add setting to disable default window icons
This patch also allows disabling JogAmp's own window icons
by simply defining a non-existing location, i.e.
-Dnewt.window.icons="null,null"
|
|
|
|
|
|
|
|
| |
d78bb1be0a6290cb94918b21865a023c01825048
- Skip relative lookup for IOUtil.ClassResources using 'asset' only (from JAR file)
- Tested w/ jar file and build-dir, see scripts/tests.sh 'USE_BUILDDIR'
|
| |
|
| |
|
| |
|
|
|
|
| |
Pixel-Scale in GLEventListener.init(...)
|
|
|
|
|
|
|
|
|
|
|
| |
- NEWTDemoListener.createPointerIcons(..)
- Use Display instance
- Simplify PointerIcon creation using a list,
skipping all non-found resources.
- JOGLNewtAppletBase
- Bring back reparent action via key 'r'
- Drop redundant PointerIcon, using NEWTDemoListener
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InterruptedException(s)
Below is an updated list of Condition-Wait classifications
as described in Bug 1211.
This list includes recent changes on GlueGen
regarding this Bug 1211.
A followup commit will address the unit tests.
- Noncancelable + Persistent-Wait
- GLMediaPlayerImpl.StreamWorker thread (changed)
- pauses thread in case of intr
- Cancelable + Persistent-Wait:
- LFRingbuffer.getImpl(..)
- LFRingbuffer.waitForFreeSlots(int)
- SyncedRingbuffer.getImpl(..)
- SyncedRingbuffer.waitForFreeSlots(int)
- FunctionTask.invokeOnNewThread(..) (changed)
- RunnableTask.invokeOnNewThread(..) (changed)
- SharedResourceRunner.run()
- SharedResourceRunner.doAndWait() (changed)
- SharedResourceRunner.start() (changed)
- SharedResourceRunner.stop() (changed)
- GLMediaPlayerImpl.StreamWorker ctor (changed)
- GLMediaPlayerImpl caller thread actions do*() (changed)
- AndroidGLMediaPlayerAPI14.getNextTextureImpl(..) (changed)
- DisplayImpl.enqueueEvent(..) (changed)
-> Persistent-Wait
-> Cancels wait and NEWTEvent
-> dispatchMessage(NEWTEventTask): always notifyCaller!
- GLDrawableHelper.invoke(..) (changed)
- DefaultEDTUtil.waitUntilIdle() (changed)
- DefaultEDTUtil.waitUntilStopped() (changed)
- DefaultEDTUtil.invokeImpl(..) (changed)
- DefaultEDTUtil.NEDT.run(..) (changed)
- AWTEDTUtil.waitUntilStopped(..) (changed)
- AWTEDTUtil.invokeImpl(..) (changed)
- AWTEDTUtil.NEDT.run(..) (changed)
- SWTEDTUtil.invokeImpl(..) (changed)
- SWTEDTUtil.waitUntilStopped(..) (changed)
- SWTEDTUtil.NEDT.run(..) (changed)
- GLWorkerThread.invokeAndWait(..)
- GLWorkerThread.start() (changed)
- GLWorkerThread.WorkerRunnable.run() (changed)
- Animator.run() (changed)
- AnimatorBase.finishLifecycleAction() (changed)
- OSXUtil.RunOnMainThread(..) (changed)
- SingletonInstanceServerSocket.Server.shutdown() (changed)
- SingletonInstanceServerSocket.Server.start() (changed)
- com.jogamp.audio.windows.waveout.Mixer.shutdown() (changed)
- Extending/Using InterruptSource.Thread (changed)
- DefaultEDTUtil.NEDT
- AWTEDTUtil.NEDT
- SWTEDTUtil.NEDT
- GLWorkerThread.thread
- Mixer.FillerThread
- Mixer.MixerThread
- Using InterruptSource.Thread (changed)
- TempFileCache
- LauncherTempFileCache
- Animator.thread
- SingletonInstanceServerSocket.Server.serverThread
Deprecated:
- FunctionTask.invoke(..) (changed)
-> on current thread, no wait -> deprecated
- RunnableTask.invoke(..) (changed)
-> on current thread, no wait -> deprecated
|
|
|
|
|
|
|
|
|
| |
(adding STATE_MASK_FULLSCREEN)
Refine getSupportedStateMask():
- always for _after_ native creation, i.e. first visibility
- removed STATE_MASK_AUTOPOSITION
- adding STATE_MASK_FULLSCREEN to minimum requirements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[GLX|WGL]_EXT_swap_control_tear extensions support
asynchronous buffer swaps, i.e. adaptive Vsync.
<https://www.opengl.org/wiki/SwapInterval_aka_vsync#Adaptive_Vsync>
<https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt>
<https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt>
<http://keithp.com/blogs/async_flip/>
The extensions utilizes a negative interval value,
enabling late swaps to occur without synchronization to the video frame.
Hence '-1' has new semantics, previously it was the 'default value'
of 'untouched vsync interval'.
New default is:
- 0 for unrealized context
- 1 for realized context
+++
It requires [GLX|WGL]_EXT_swap_control,
hence we shall ensure to use use this extension
in the implementation of GLContext.setSwapInterval(..).
+++
Mesa3D seems to support GLX_SGI_swap_control only.
+++
Implemented on Windows and X11.
+++
On GNU/Linux using NVidia driver w/ my setup(*), sadly the query
GLX.glXQueryDrawable(displayHandle, drawable.getHandle(), GLX.GLX_LATE_SWAPS_TEAR_EXT, val);
always returns zero here, indicating async vsync is not supported.
(Queried the attribute for every frame in windowed or fullscreen mode)
Fullscreen
(*)
- Debian 8
- Kernel 3.16
- KDE/Kwin
- GL Version 4.5 (Core profile, arb, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.0 NVIDIA 355.06 [GL 4.5.0, vendor 355.6.0 (NVIDIA 355.06)]
- GL_RENDERER GeForce GTX 660/PCIe/SSE2
- Samsung U28D590 (DFP-4): Internal DisplayPort
+++
|
|
|
|
|
|
|
|
| |
- Fix STATE_MASK_CREATENATIVE
- Simplify resetStateMask()
- Windows WindowDriver: Remove STATE_MASK_STICKY from supported states
- TestGearsNEWT: Use NEWTDemoListener
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getSupportedReconfigMaskImpl()
- See getSupportedStateMask() for semantics
- getSupportedReconfigMaskImpl() result now used for isReconfigureMaskSupported()
- getSupportedReconfigMaskImpl() implementations:
- Full featured: X11, Windows and OSX
- X11: Use WindowManager Atoms for certain features (dynamic)
- Others: Use fixed features.
- TODO: Consider avoiding actions if not supported.
|
|
|
|
|
|
|
|
|
| |
- STATE_BIT_FULLSCREEN_SPAN is private and used for reconfigure,
hence STATE_BIT_COUNT_RECONFIG is needed.
- STATE_BIT_FULLSCREEN_SPAN is added at the end of public state bits
- PSTATE_BIT_MINMAXSIZE_SET is unused.
|
| |
|