| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
src/java/com/jogamp/common/os/Platform.java
src/junit/com/jogamp/common/util/TestTempJarCache.java
(re-injected that api-doc of addNativeJarLibsImpl)
|
| |
| |
| |
| | |
of the method.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
|/ |
|
|
|
|
| |
to 2.2.0)
|
|
|
|
| |
branch): Using direct regexp for excludes
|
|
|
|
|
|
|
| |
Refactor base semjar unit test class into
com.jogamp.junit.util.VersionSemanticsUtil, part of new gluegen-test-util.jar.
The new gluegen-test-util.jar shall be used by all other modules to test versioning.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TestVersionSemantics adds testing of semantic versioning
of 2.1.5 gluegen-rt.jar against the current version within a unit test.
Currently we expect BACKWARD_COMPATIBLE_USER
and need to toggle this to NON_BACKWARD_COMPATIBLE,
if actually perfoming non compatible major or minor version changes.
The latter is allowed right now, since we increment from 2.1 -> 2.2!
- Added https://github.com/jeluard/semantic-versioning semver.jar (Apache License Version 2.0)
|
|
|
|
| |
readUInt32(..) must return long due to EOF
|
|
|
|
| |
-> 'toUInt32Long', add 'uint32LongtoInt'
|
|
|
|
| |
conversion functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already have several locations where bitstream operations are required and
partially implemented (JPEG decoder, media parsing, ..)
as well as endian related conversion (elf parser, ..).
Create a versatile Bitstream class allowing:
- Utilize I/O operations on I/O streams, buffers and arrays
- Consider MSBfirst / LSBfirst mode
- Linear bit R/W operations
- Bulk R/W operations w/ endian related type conversion
- Allow mark/reset and switching streams and input/output mode
- Optimized operations
Complete set of unit tests included, covering hopefully all cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
converting to file-path or URI (Windows UNC / share host)
Note: Authority for 'file-scheme' URI's is used on Windows to denote the host of the shared resource -> UNC
Following methods of IOUtil didn't consider the authority for file-scheme URI:
'URL toURL(final URI uri)'
'String decodeURIToFilePath(final String uriPath)'
'String decodeURIIfFilePath(final URI uri)'
Further more, the patterns 'patternSingleFS' and 'patternSingleBS'
converted multiple '\' '/' to one replacement.
However, we should not change the separator count and replace them one-by-one.
TestIOUtilURIHandling:
- Added shared-file-host 'filehost' test cases to file URIs and plain file path tests.
- Passed on Unix and Windows.
Added 'make/scripts/test-win32-smb_share.bat'
- Testing actual windows share usage
- Passed on Windows
|
|
|
|
|
|
|
| |
Only use IOUtil.encodeToURI() if required,
i.e. 'new URI(String)' but not 'new URI(scheme, ...)' since the latter already encodes the path.
TestIOUtilURIHandling.test00BasicCoding() validates above findings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IOUtil.decodeURIToFilePath(..) for native usage.
Refine comments, API doc.
toURL(..): Apply space conversion, decodeFromURI(..), on file-scheme path,
ensuring decoded space.
++
Add decodeURIToFilePath(String uriPath) and decodeURIToFilePath(URI uri)
Both methods shall simplify decoding a file-URI for native platform usage.
Tested in TestIOUtilURIHandling
+++
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Netbeans's JarURLStreamHandler
- 'URL IOUtil.toURL(URI)'
- Needs to encode the file-path portion on Windows(*) if exists.
The file-path here shall only be encoded as follows:
- backslash -> slash
- ensure starting with slash
(*) We perform above action for all OS,
if 'false == File.separator.equals("/")'
- Added high verbosity in DEBUG mode to easy debugging
for future cases ..
- Cleanup URI/URL unit tests, i.e. split URLCompositionTest into:
- TestIOUtilURICompose
- TestIOUtilURIHandling (Now covers Bug 857 as well)
- TestUrisWithAssetHandler
- TestURIQueryProps
Tested all unit tests manually on GNU/Linux and Windows w/ JRE 7u45
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'os.and.arch' libraries]
JNILibLoaderBase.addNativeJarLibsImpl(..):
If the modules's jar file contains the folder 'natives/<os.and.arch>/'
we assume a big-fat jar and attempt to load all native libraries from the same.
The test for above folder is performed via the class ClassLoader's getResource(..)
and is considered inexpensive.
If the folder exists and native libraries could be loaded, the method returns successfull.
Otherwise, the 'slim' jar file is attempted to be loaded, even if such folder exist.
|
|
|
|
| |
native URI root and jar file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'@FixMethodOrder(MethodSorters.NAME_ASCENDING)' annotation
Issue: Java7 unit test order is no more predictable
Fix: junit 4.11 performs a determined (not defined default) test order.
Additionally user can force ascending method name test order
Produced a drop-in junit.jar / junit-source.zip replacement, which includes
- junit version version 4.11
- hamcrest-core version 1.3
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
simple approach; Split 'grow' into 'growEmpty' and 'growFull'
- java.lang.reflect.Array can instantiate an array w/ a given array-type and length
- array-type is Class<? extends T[]>
- We either deduct the array-type via array.getClass(), or pass it (ctor for empty Ringbuffer).
- Split 'growBuffer(T[] newElements, int amount, ..)' into:
- 'growEmptyBuffer(T[] newElements)'
- 'growFullBuffer(int amount)'
Allowing a more clean API w/ simpler semantics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SyncedRingbuffer and lock-free LFRingbuffer.
SyncedRingbuffer is moved from JOGL to GlueGen, and generalized w/ common interface Ringbuffer
to allow testing diff. implementations.
- Added Ringbuffer.AllocEmptyArray factory interface, allowing to pass a constructor
to construct the generic array.
- Added functionality is growBuffer(..), allowing to either grow a full or empty buffer,
using Ringbuffer.AllocEmptyArray.
- Removed explicit 'clearRef' at get*(..), always clear the taken reference for better
interface generalization.
- Added LFRingbuffer, exposing lock-free get*(..) and put*(..) methods
using the 'Always Keep One Slot Open' pattern using the read/write index as barriers only.
- Ctor's copy an optional passed user array into the internal array,
utilizing Ringbuffer.AllocEmptyArray.
- Added unit tests.
|
|
|
|
|
|
| |
result w/ OS specific File.separatorChar
Take 3 (duh!): JRE impl. varies .. i.e. plain URL w/o JAR path differs from URL w/ JAR scheme on Windows .. well.
|
|
|
|
|
|
| |
result w/ OS specific File.separatorChar
The JAR entry shall stay untouched, i.e. separator is platform independent '/'.
|
|
|
|
| |
w/ OS specific File.separatorChar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compatible w/ file scheme.
Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823).
The URI encoded path cannot be read by File I/O (if file scheme), since the latter
requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space).
The encoded URL is produced if calling 'uri.toURL()' and hence
the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'.
Tested w/
- synthetic URI/URL coposition (unit test)
- manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl.
+++
Misc.:
- 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)'
++
|
|
|
|
| |
to remove DNS Lookups etc ..
|
|
|
|
| |
whitespace tokenizer); String match: Store end-of-match and flag defined components.
|
|
|
|
|
|
|
| |
blocking exceptions to be shown.
Exceptions occuring on non blocking off-thread tasks shall at least be made visible
while not allowed to crash the system.
|
|
|
|
|
|
|
|
| |
Added the ability for users to set a "resolver" in JarUtil
that lets it find resources that are loaded by a custom classloader.
This is needed in OSGi apps (like Eclipse RCP apps), since OSGi
resources do not have simple jar: URLs (they use a custom
protocol called bundleresource:).
|
|
|
|
|
|
|
|
| |
/proc/self/exe (Linux) or a found java/jvm native lib.
- PlatformPropsImpl.queryABITypeImpl: Check Elf Header for ARM + !ANDROID (i.e. add other OS than Linux, use native java/jmv lib)
- NativeLibrary.enumerateLibraryPaths: Add 'sun.boot.library.path' to enumeration!
- TestElfReader01: Add test for finding java/jvm native lib and parse it
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to distinguish ARM soft-float/hard-float (part-2)
+ /**
+ * Returns the {@link ABIType} of the current platform using given {@link CPUType cpuType}
+ * and {@link OSType osType} as a hint.
+ * <p>
+ * Note the following queries are performed:
+ * <ul>
+ * <li> not {@link CPUFamily#ARM} -> {@link ABIType#GENERIC_ABI} </li>
+ * <li> else
+ * <ul>
+ * <li> not {@link OSType#LINUX} -> {@link ABIType#EABI_GNU_ARMEL} </li>
+ * <li> else
+ * <ul>
+ * <li> Elf ARM Tags -> {@link ABIType#EABI_GNU_ARMEL}, {@link ABIType#EABI_GNU_ARMHF} </li>
+ * </ul></li>
+ * </ul></li>
+ * </ul>
+ * </p>
+ * <p>
+ * Elf ARM Tags are read using {@link ElfHeader}, .. and {@link SectionArmAttributes#abiVFPArgsAcceptsVFPVariant(byte)}.
+ * </p>
+ *
+ * @param cpuType
+ * @param osType
+ * @return
+ */
+ private static final ABIType queryABITypeImpl(CPUType cpuType, OSType osType) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
distinguish ARM soft-float/hard-float (part-1)
https://jogamp.org/bugzilla/show_bug.cgi?id=681
+ * References:
+ * <ul>
+ * <li>http://linux.die.net/man/5/elf</li>
+ * <li>http://www.sco.com/developers/gabi/latest/contents.html</li>
+ * <li>http://infocenter.arm.com/
+ * <ul>
+ * <li>ARM IHI 0044E, current through ABI release 2.09</li>
+ * <li>ARM IHI 0045D, current through ABI release 2.09</li>
+ * </ul></li>
Added self contained jogamp.common.os.elf package w/ entry point class ElfHeader
to read a RandomAccessFile and parse it as an ELF file.
ELF Parsing completness:
- Header: OK
- SectionHeader: OK
- Section Type SHT_ARM_ATTRIBUTES: OK
- Will be read into SectionArmAttributes
- Used to distinguisgh soft/hard VFP float
Tested manually on:
- Linux intel 32bit / 64bit, arm soft-float and hard-float
|
|
|
|
| |
w/ initialSizeElem:=0.
|
|
|
|
|
|
|
|
|
|
|
|
| |
simple primitive stack implementation.
Currently only FILO put/get operations are implemented using either
primitive arrays as I/O itself or <Type>Buffer.
Unit tests are included..
Note: Only FloatStack is implemented in a manual, where others (IntegerStack)
is derived (generated) from it. Same goes w/ unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in case leading non digits appear.
'\D.*' matches a leading non-digit and then any character.
First the string is tokenized by delim:
"OpenGL ES GLSL ES 1.0.16" -> "OpenGL ES GLSL ES 1", "0", "16"
Enhance pattern as follows and access collected group if matching:
// group1: \D* == leading non digits, optional
// group2: \d* == digits
// group3: .* == any pending chars, optional
final java.util.regex.Pattern nonDigitsCutOff = java.util.regex.Pattern.compile("(\\D*)(\\d*)(.*)");
Reorganized storage from atomic values to int[3] array, allowing simple pattern matching loop.
Added unit test.
|
|
|
|
| |
util. ValueConv for primitive type value conversion
|
| |
|
| |
|
|
|
|
| |
start, otherwise we may collide w/ a failed start. Misc: Cleanup / reuse strings.
|
|
|
|
|
|
|
|
| |
- LockExt -> ThreadLock - clarifying semantics (API Change)
- ThreadLock: Remove isOwner(), use isOwner(Thread.currentThread)
- adding @Override
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Derivation
+++
JNILibLoaderBase.addNativeJarLibs(..): Add API doc
JNILibLoaderBase:
"addNativeJarLibs(Class<?> classFromJavaJar, String allNativeJarBaseName, String[] atomicNativeJarBaseNames)" ->
"addNativeJarLibs(Class<?>[] classesFromJavaJars, String singleJarMarker, String[] stripBasenameSuffixes)"
Derive the 'all' (1st choice) native JAR URL solely on the given class's JAR URL.
Examples:
JOCL:
// only: jocl.jar -> jocl-natives-'os.and.arch'.jar
addNativeJarLibs(new Class<?>[] { JOCLJNILibLoader.class }, null, null );
JOGL:
final ClassLoader cl = GLProfile.class.getClassLoader();
// either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar
// or: nativewindow-core.jar -> nativewindow-natives-<os.and.arch>.jar,
// jogl-core.jar -> jogl-natives-<os.and.arch>.jar,
// (newt-core.jar -> newt-natives-<os.and.arch>.jar)? (if available)
final String newtFactoryClassName = "com.jogamp.newt.NewtFactory";
final Class<?>[] classesFromJavaJars = new Class<?>[] { NWJNILibLoader.class, GLProfile.class, null };
if( ReflectionUtil.isClassAvailable(newtFactoryClassName, cl) ) {
classesFromJavaJars[2] = ReflectionUtil.getClass(newtFactoryClassName, false, cl);
}
JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-noawt", "-mobile", "-core" } );
Efficiency / Performance:
- Reduced JAR URL lookup calls JarUtil.getJarURL(..) - JNILibLoaderBase, Platform, JarUtil
- Attempt loading Jar files (native, class, ..) only once - TempJarCache
Code Cleanup (IOUtil, JarUtil, :
- IOException if not found
- IllegalArgumentException if null argument
+++
jogamp.android-launcher.jar -> jogamp-android-launcher.jar
+++
|
| |
|
| |
|
| |
|