aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Minor edits: space, final qualifier; setenv-build-*: Add generic JDK locationSven Gothel2014-06-171-1/+1
|
* JavaEmitter.typeToJavaType: Simplify if-else block ; ↵Sven Gothel2014-06-162-5/+5
| | | | JavaType.getDumpString(): Add more info ..
* gluegen: avoid appending Strings in a loop, pull out a Stringbuilder we can ↵Harvey Harrison2014-05-171-11/+17
| | | | | | | | reuse Reuse a single stringbuilder to build all the comment strings and emit them if required. Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: use parseInt, parseLong to avoid boxing unboxing an Integer/LongHarvey Harrison2014-05-171-2/+2
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* RunnableTask: Add static method 'invokeOnNewThread(..)' for convenience ↵Sven Gothel2014-05-111-1/+39
| | | | (Used in JOGL to mitigate Bug 1004)
* Bug 923: Remove dependency of CStruct annotation processor _generation_ and ↵Sven Gothel2014-05-114-177/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated_class_user due to Java8 issues. Java8's annotation processor as embedded within javac does not allow referencing not-yet existing generated classes in a class source code which will produce these generated classes via the annotation process. Example: +++ import com.jogamp.gluegen.structgen.CStruct; public class Lala { @CStruct(name="RenderingConfig", header="TestStruct01.h") public RenderingConfig config; } +++ Above example illustrates that the type 'RenderingConfig' does not exist at time of processing the annotation. The type will be created via the annotation process itself. Even though we pass '-proc:only', i.e. skip java compilation, Java8's annotation processing via javac fails in such case. We see this as a bug within javac's annotation processing itself! +++ This workaround splits the annotation process and using the class as generated by the former. To allow this to work, CStruct receives a new field 'jname' allowing to enforce the java-name of the structure using a dummy field type like boolean. @CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h") public boolean dummy; Further more CStruct can be annotated on the package, i.e. 'package-info.java', avoiding the dependency problem altogether. To support multiple header files and types, 'CStructs' has been introduced using an array of 'CStruct'. @CStructs({@CStruct(name="RenderingConfig", header="TestStruct01.h"), @CStruct(name="Pixel", header="TestStruct02.h")}) package com.jogamp.gluegen.test.junit.structgen; Tests: - Build w/ Java7 and Java8 - Validated 'major version 50' (Java 6) class files (OK)
* gluegen: avoid bugs with sign-extension in readUInt16Harvey Harrison2014-04-111-2/+3
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Revert "Fix CStruct annotation processor warning."v2.1.5Sven Gothel2014-03-101-1/+1
| | | | This reverts commit fccb2460832aedd1b51372aa1e7881770cb638c9.
* Minor Cleanup after merging fixes for bugs 987, 990, 992 and 994Sven Gothel2014-03-104-11/+14
|
* Merge remote-tracking branch ↵Sven Gothel2014-03-101-1/+1
|\ | | | | | | 'remotes/wwalker/bug_994_fix_cstruct_annotation_warning'
| * Fix CStruct annotation processor warning.Wade Walker2014-03-061-1/+1
| | | | | | | | | | Updated the Java source version the annotation processor supports to stop it from throwing a warning during the build process.
* | Merge remote-tracking branch ↵Sven Gothel2014-03-101-0/+3
|\ \ | | | | | | | | | 'remotes/wwalker/bug_992_allow_ignore_of_unnamed_structs'
| * | Allow Ignore in config to ignore unnamed structs.Wade Walker2014-03-051-0/+3
| |/ | | | | | | | | | | | | | | | | | | Augments the behavior of the Ignore keyword to ignore when gluegen skips the emission of unnamed structs. These structs are usually unnamed because we've created opaque types for them, so we know they're not going to be emitted and want to be able to suppress the warning on a case-by-case basis.
* | Fix accidental tabs.Wade Walker2014-03-042-11/+11
| |
* | Remove warnings in emitted C code.Wade Walker2014-03-043-1/+23
|/ | | | | | | | Fix 1: Only emit "int * _offsetHandle = NULL" if it will be used, to avoid unused variable warning. Fix 2: Add "unsigned" to typecasts in C function calls when needed to avoid implicit typecast warning. This commit also adds a unit test for a method that uses an "unsigned char **" parameter, to mimic the JOCL clCreateProgramWithBinary() function that caused the typecast warnings.
* Bitstream: Add 'throwIOExceptionOnEOF' mode; fix certain EOS situations ↵Sven Gothel2014-02-211-9/+85
| | | | (flush, skip)
* Bug 980: Refine Bitstream API 'signed' and 'unsigned' semantics - ↵Sven Gothel2014-02-211-39/+43
| | | | readUInt32(..) must return long due to EOF
* Bitstream: Another CamelCase fix: uint32LongtoInt -> uint32LongToIntSven Gothel2014-02-211-2/+2
|
* Bitstream: Refine c70c730b22c847668cf475dc6f841b85297ac3ab: 'toUint32Long' ↵Sven Gothel2014-02-211-10/+18
| | | | -> 'toUInt32Long', add 'uint32LongtoInt'
* Bitstream: Add static 'long toUint32Long(int)' and 'int toUint32Int(int)' ↵Sven Gothel2014-02-211-10/+32
| | | | conversion functions
* Bug 890: Adding versatile Bitstream implementationSven Gothel2014-02-201-0/+1341
| | | | | | | | | | | | | | | | 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.
* Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..) / Instrument ↵Sven Gothel2014-02-121-8/+99
| | | | ReflectionUtil's forName(..) usage
* Bug 856 - Android: Support dual ABI (x86 i686 *and* ARMv7arm), i.e. pick ↵Sven Gothel2014-01-242-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'best' ABI - Use 'os.arch' as a prelim CPUType for MachineDescription - Always attempt to load a binary and parse it's elf header - Linux: self-exe - Android: gluegen-rt library - Other: java lib - Always use details (ABI) if ARM - Android: Check CPU_TYPE and CPU_TYPE2 // FIXME / HACK: // We use sCPUType for MachineDescriptionRuntime.getStatic() // until we have determined the final CPU_TYPE, etc. // MachineDescriptionRuntime gets notified via MachineDescriptionRuntime.notifyPropsInitialized() below. // // We could use Elf Ehdr's machine value to determine the bit-size // used for it's offset table! // However, 'os.arch' should be a good guess for this task. Tested manually on - Linux x86, x86_64, armhf (raspi) - Android intel and arm - Windows x86_64 - OSX x86_64
* Platform: Fix API doc of getCPUFamily(), getCPUType() and getABIType()Sven Gothel2014-01-231-3/+9
|
* Bug 945 - GlueGen's IOUtil does not consider file URI's authority when ↵Sven Gothel2014-01-221-11/+32
| | | | | | | | | | | | | | | | | | | | | | | 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
* GlueGen: Add 'MethodJavadoc <method-name> comment-line..' configuration ↵Sven Gothel2014-01-212-38/+85
| | | | element, allowing to add custom API doc lines per method for the JavaMethodBindingEmitter
* Add TaskBase.flush(Throwsable): To propagate optional reason for flush ; ↵Sven Gothel2014-01-111-1/+10
| | | | Deprecate flush()
* IntBitfield: Fix ctor: min 1 unit; Fix getBitCount(): Use unsigned ↵Sven Gothel2014-01-091-9/+14
| | | | right-shift '>>>'
* gluegen: MethodBinding implements clone() without implenting ClonableHarvey Harrison2014-01-051-6/+1
| | | | | | Just directly call the copy-constructor and avoid using clone. Signed-off-by: Harvey Harrison <[email protected]>
* IOUtil: Add convenience compound class 'ClassResources'Sven Gothel2013-12-301-0/+37
|
* gluegen: use String.format to emit the error exception in implementation classesv2.1.3Harvey Harrison2013-11-301-1/+2
| | | | | | | | | | | | | | | | | Changes emitted code from: if (__addr_ == 0) { throw new Exception("Method \"" + "$methodName" + "\" not available"); to: if (__addr == 0) { throw new Exception(String.format("Method \"%s\" not available", "$methodName")); This removes all the redundant error message parts for each error string and only stores the unique method name in a string. Signed-off-by: Harvey Harrison <[email protected]>
* IOUtil.encodeToURI(): Only use method if requiredSven Gothel2013-11-281-3/+3
| | | | | | | 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.toURL(..) Apply decodeFromURI(uri.getPath()) if file-scheme; Add ↵Sven Gothel2013-11-282-13/+75
| | | | | | | | | | | | | | | | | | | 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 +++
* JARUtil/IOUtil: Reuse IOUtil.JAR_SCHEME_SEPARATOR (now a char); Add DEBUG to ↵Sven Gothel2013-11-272-7/+12
| | | | JarUtil.getJarEntry(..)
* IOUtil: Add comments to slashify args @ caller; Use validated File @ ↵Sven Gothel2013-11-271-7/+7
| | | | | | | | | | | | | | | | | | | IOUtil.toURISimple ; DEBUG: stdout -> stderr Add comments to slashify(..) arguments for better documentation. +++ Use validated File @ IOUtil.toURISimple(..): slashify(file, true, isDirectory) to slashify(new File(path).getAbsolutePath(), true, isDirectory) i.e. same w/ above variant and determine absolute path via File instance. +++ DEBUG: stdout -> stderr
* IOUtil/JarUtil: DEBUG output on stderr not stdoutSven Gothel2013-11-272-26/+30
|
* JarUtil: Use common strings for exceptions (same as used in IOUtil)Sven Gothel2013-11-271-2/+2
|
* Bug 754 - JarUtil: Add method to generate resource URI from class's Jar URI ↵Sven Gothel2013-10-312-0/+68
| | | | and resource name (Remove Ubuntu fonts from jogl-all.jar, provide it separately to reduce footprint for the masses.)
* TempJarCache: Make 'initialization' query/flag thread safe, i.e. synchronize ↵Sven Gothel2013-10-241-4/+21
| | | | | | | if !isInit (dbl-check locking) - isInit must be set to 'true' _after_ actual initialization, so caller can be blocked until done - staticInitError must be volatile as well
* Fix Bug 865: Safari >= 6.1 [OSX]: May employ xattr on 'com.apple.quarantine' ↵Sven Gothel2013-10-233-29/+98
| | | | | | | | | on 'PluginProcess.app' - IOUtil.getTempDir(..): Don't test executable caps on OSX for java_io_tmpdir - JarUtil.extract(..): Issue native fixNativeLibAttribs(..) on OSX for native library files, i.e. remove xattr 'com.apple.quarantine'
* Fix Bug 857: GlueGen produces erroneous file URI on Windows, which breaks ↵Sven Gothel2013-10-182-20/+115
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* gluegen: add all missing @Override annotationsHarvey Harrison2013-10-1743-0/+162
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove trailing whitespaceHarvey Harrison2013-10-17113-2071/+2071
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* ArrayHashSet: Use final local vars if applicableSven Gothel2013-10-171-7/+7
|
* ArrayHashSet: Add @OverrideSven Gothel2013-10-171-0/+27
|
* Merge pull request #16 from forticulous/buffers-spellingSven Gothel2013-10-121-12/+12
|\ | | | | Buffers.java - spelling (lenght -> length) - thx
| * Buffers.java - spellingMatthew Gibson2013-08-261-12/+12
| |
* | Bug 820: Escape SPACE in filenames for URI ctor, use decoded URI components ↵Sven Gothel2013-10-072-13/+36
| | | | | | | | | | | | | | | | | | | | when compiling new URI. Add IOUtil: - String encodeToURI(String) - String decodeFromURI(String) Both only handle escaping of SPACE only. Determine whether other chars need to be treated.
* | VersionUtil.getPlatformInfo: include 'getOSVersionNumber()' beside it's ↵Sven Gothel2013-10-031-1/+1
| | | | | | | | string representation.
* | PropertyAccess: Add trusted properties sun.java2d.opengl, ↵Sven Gothel2013-10-021-1/+8
| | | | | | | | sun.java2d.noddraw, sun.java2d.d3d, sun.awt.noerasebackground