diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util')
25 files changed, 98 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java index 5f9b25530..0d4452864 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java +++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java @@ -46,12 +46,14 @@ public class GLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLAr super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { for(int i=0; i<subArrays.size(); i++) { subArrays.get(i).getData().setVBOName(vboName); } } + @Override public final void addSubHandler(GLArrayHandlerFlat handler) { subArrays.add(handler); } @@ -62,6 +64,7 @@ public class GLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLAr } } + @Override public final void enableState(GL gl, boolean enable, Object ext) { if(enable) { final boolean vboBound = bindBuffer(gl, true); diff --git a/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java index be50fa9ef..c1f6b954a 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java @@ -44,14 +44,17 @@ public class GLDataArrayHandler extends GLVBOArrayHandler implements GLArrayHand super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { throw new UnsupportedOperationException(); } + @Override public final void addSubHandler(GLArrayHandlerFlat handler) { throw new UnsupportedOperationException(); } + @Override public final void enableState(GL gl, boolean enable, Object ext) { if(enable) { if(!ad.isVBO()) { diff --git a/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java index 8908bd89d..3aac9612a 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java @@ -43,14 +43,17 @@ public class GLFixedArrayHandler extends GLVBOArrayHandler implements GLArrayHan super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { throw new UnsupportedOperationException(); } + @Override public final void addSubHandler(GLArrayHandlerFlat handler) { throw new UnsupportedOperationException(); } + @Override public final void enableState(GL gl, boolean enable, Object ext) { final GLPointerFunc glp = gl.getGL2ES1(); if(enable) { diff --git a/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java index bbdd32f0f..acec0510f 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java +++ b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java @@ -45,10 +45,12 @@ public class GLFixedArrayHandlerFlat implements GLArrayHandlerFlat { this.ad = ad; } + @Override public GLArrayDataWrapper getData() { return ad; } + @Override public final void syncData(GL gl, Object ext) { final GLPointerFunc glp = gl.getGL2ES1(); switch(ad.getIndex()) { @@ -69,6 +71,7 @@ public class GLFixedArrayHandlerFlat implements GLArrayHandlerFlat { } } + @Override public final void enableState(GL gl, boolean enable, Object ext) { final GLPointerFunc glp = gl.getGL2ES1(); if(enable) { diff --git a/src/jogl/classes/jogamp/opengl/util/GLVBOArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLVBOArrayHandler.java index 2bab1c2c9..5198cacfa 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLVBOArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/GLVBOArrayHandler.java @@ -45,6 +45,7 @@ public abstract class GLVBOArrayHandler implements GLArrayHandler { this.ad = ad; } + @Override public final boolean bindBuffer(GL gl, boolean bind) { if( !ad.isVBO() ) { return false; diff --git a/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java index e893bab89..c39b78bb8 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java @@ -68,6 +68,7 @@ public abstract class EGLMediaPlayerImpl extends GLMediaPlayerImpl { public final long getImage() { return image; } public final long getSync() { return sync; } + @Override public String toString() { return "EGLTextureFrame[pts " + pts + " ms, l " + duration + " ms, texID "+ texture.getTextureObject() + ", img "+ image + ", sync "+ sync+", clientBuffer "+clientBuffer+"]"; } diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index ebb344664..7e41c3fce 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -201,10 +201,14 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { } protected final void setTextureType(int t) { textureType=t; } + @Override public final void setTextureMinMagFilter(int[] minMagFilter) { texMinMagFilter[0] = minMagFilter[0]; texMinMagFilter[1] = minMagFilter[1];} + @Override public final int[] getTextureMinMagFilter() { return texMinMagFilter; } + @Override public final void setTextureWrapST(int[] wrapST) { texWrapST[0] = wrapST[0]; texWrapST[1] = wrapST[1];} + @Override public final int[] getTextureWrapST() { return texWrapST; } private final void checkGLInit() { @@ -1043,6 +1047,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { public boolean isActive() { return isActive; } public StreamException getStreamErr() { return streamErr; } + @Override public void run() { setName(getName()+"-StreamWorker_"+StreamWorkerInstanceId); StreamWorkerInstanceId++; diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java index 390c20346..a6a6fba97 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java @@ -252,6 +252,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { loaded[i] = false; } final DynamicLibraryBundle dl = AccessController.doPrivileged(new PrivilegedAction<DynamicLibraryBundle>() { + @Override public DynamicLibraryBundle run() { return new DynamicLibraryBundle(new FFMPEGDynamicLibraryBundleInfo()); } } ); @@ -272,6 +273,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { // lookup AccessController.doPrivileged(new PrivilegedAction<Object>() { + @Override public Object run() { for(int i = 0; i<symbolCount; i++) { symbolAddr[i] = dl.dynamicLookupFunction(symbolNames[i]); diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java index 2abd73181..d2ef026bd 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -346,6 +346,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { if( null != gl && STREAM_ID_NONE != vid ) { final GLContextImpl ctx = (GLContextImpl)gl.getContext(); AccessController.doPrivileged(new PrivilegedAction<Object>() { + @Override public Object run() { final ProcAddressTable pt = ctx.getGLProcAddressTable(); final long procAddrGLTexSubImage2D = pt.getAddressFor("glTexSubImage2D"); diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java index 2d74fa532..3b443fdd0 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java @@ -50,14 +50,17 @@ public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandle super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { throw new UnsupportedOperationException(); } + @Override public final void addSubHandler(GLArrayHandlerFlat handler) { throw new UnsupportedOperationException(); } + @Override public final void enableState(GL gl, boolean enable, Object ext) { final GL2ES2 glsl = gl.getGL2ES2(); if( null != ext ) { diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java index a5f78b5d6..34a381d7d 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java @@ -47,10 +47,12 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat { this.ad = ad; } + @Override public GLArrayDataWrapper getData() { return ad; } + @Override public final void syncData(GL gl, Object ext) { final GL2ES2 glsl = gl.getGL2ES2(); if( null != ext ) { @@ -77,6 +79,7 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat { }*/ } + @Override public final void enableState(GL gl, boolean enable, Object ext) { final GL2ES2 glsl = gl.getGL2ES2(); if( null != ext ) { diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java index bcc146d78..b175bb5dc 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java @@ -50,12 +50,14 @@ public class GLSLArrayHandlerInterleaved extends GLVBOArrayHandler implements GL super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { for(int i=0; i<subArrays.size(); i++) { subArrays.get(i).getData().setVBOName(vboName); } } + @Override public final void addSubHandler(GLArrayHandlerFlat handler) { subArrays.add(handler); } @@ -66,6 +68,7 @@ public class GLSLArrayHandlerInterleaved extends GLVBOArrayHandler implements GL } } + @Override public final void enableState(GL gl, boolean enable, Object ext) { if(enable) { if(!ad.isVBO()) { diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java index d86940e04..c329945c4 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java @@ -137,6 +137,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun gl.glDisable(cap); } } + @Override public void glGetFloatv(int pname, java.nio.FloatBuffer params) { if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetFloatv(pname, params); @@ -144,6 +145,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } gl.glGetFloatv(pname, params); } + @Override public void glGetFloatv(int pname, float[] params, int params_offset) { if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetFloatv(pname, params, params_offset); @@ -151,6 +153,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } gl.glGetFloatv(pname, params, params_offset); } + @Override public void glGetIntegerv(int pname, IntBuffer params) { if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetIntegerv(pname, params); @@ -158,6 +161,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } gl.glGetIntegerv(pname, params); } + @Override public void glGetIntegerv(int pname, int[] params, int params_offset) { if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetIntegerv(pname, params, params_offset); @@ -219,48 +223,61 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun public int glGetMatrixMode() { return pmvMatrix.glGetMatrixMode(); } + @Override public void glMatrixMode(int mode) { pmvMatrix.glMatrixMode(mode); } + @Override public void glLoadMatrixf(java.nio.FloatBuffer m) { pmvMatrix.glLoadMatrixf(m); } + @Override public void glLoadMatrixf(float[] m, int m_offset) { glLoadMatrixf(GLBuffers.newDirectFloatBuffer(m, m_offset)); } + @Override public void glPopMatrix() { pmvMatrix.glPopMatrix(); } + @Override public void glPushMatrix() { pmvMatrix.glPushMatrix(); } + @Override public void glLoadIdentity() { pmvMatrix.glLoadIdentity(); } + @Override public void glMultMatrixf(java.nio.FloatBuffer m) { pmvMatrix.glMultMatrixf(m); } + @Override public void glMultMatrixf(float[] m, int m_offset) { glMultMatrixf(GLBuffers.newDirectFloatBuffer(m, m_offset)); } + @Override public void glTranslatef(float x, float y, float z) { pmvMatrix.glTranslatef(x, y, z); } + @Override public void glRotatef(float angdeg, float x, float y, float z) { pmvMatrix.glRotatef(angdeg, x, y, z); } + @Override public void glScalef(float x, float y, float z) { pmvMatrix.glScalef(x, y, z); } public void glOrtho(double left, double right, double bottom, double top, double near_val, double far_val) { glOrthof((float) left, (float) right, (float) bottom, (float) top, (float) near_val, (float) far_val); } + @Override public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) { pmvMatrix.glOrthof(left, right, bottom, top, zNear, zFar); } public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { glFrustumf((float) left, (float) right, (float) bottom, (float) top, (float) zNear, (float) zFar); } + @Override public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) { pmvMatrix.glFrustumf(left, right, bottom, top, zNear, zFar); } @@ -268,6 +285,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun // // LightingIf // + @Override public void glColor4f(float red, float green, float blue, float alpha) { fixedFunction.glColor4f(gl, red, green, blue, alpha); } @@ -278,18 +296,23 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun ValueConv.byte_to_float(blue, false), ValueConv.byte_to_float(alpha, false) ); } + @Override public void glLightfv(int light, int pname, java.nio.FloatBuffer params) { fixedFunction.glLightfv(gl, light, pname, params); } + @Override public void glLightfv(int light, int pname, float[] params, int params_offset) { glLightfv(light, pname, GLBuffers.newDirectFloatBuffer(params, params_offset)); } + @Override public void glMaterialfv(int face, int pname, java.nio.FloatBuffer params) { fixedFunction.glMaterialfv(gl, face, pname, params); } + @Override public void glMaterialfv(int face, int pname, float[] params, int params_offset) { glMaterialfv(face, pname, GLBuffers.newDirectFloatBuffer(params, params_offset)); } + @Override public void glMaterialf(int face, int pname, float param) { glMaterialfv(face, pname, GLBuffers.newDirectFloatBuffer(new float[] { param })); } @@ -297,6 +320,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun // // Misc Simple States // + @Override public void glShadeModel(int mode) { fixedFunction.glShadeModel(gl, mode); } @@ -316,13 +340,16 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun public void glClientActiveTexture(int textureUnit) { fixedFunction.glClientActiveTexture(textureUnit); } + @Override public void glEnableClientState(int glArrayIndex) { fixedFunction.glEnableClientState(gl, glArrayIndex); } + @Override public void glDisableClientState(int glArrayIndex) { fixedFunction.glDisableClientState(gl, glArrayIndex); } + @Override public void glVertexPointer(GLArrayData array) { if(array.isVBO()) { if(!gl.glIsVBOArrayBound()) { @@ -339,10 +366,12 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun fixedFunction.glVertexPointer(gl, array); } + @Override public void glVertexPointer(int size, int type, int stride, java.nio.Buffer pointer) { glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride, pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER)); } + @Override public void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) { int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER); if(vboName==0) { @@ -352,6 +381,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER)); } + @Override public void glColorPointer(GLArrayData array) { if(array.isVBO()) { if(!gl.glIsVBOArrayBound()) { @@ -367,10 +397,12 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } fixedFunction.glColorPointer(gl, array); } + @Override public void glColorPointer(int size, int type, int stride, java.nio.Buffer pointer) { glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride, pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER)); } + @Override public void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) { int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER); if(vboName==0) { @@ -380,6 +412,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER)); } + @Override public void glNormalPointer(GLArrayData array) { if(array.getComponentCount()!=3) { throw new GLException("Only 3 components per normal allowed"); @@ -398,10 +431,12 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } fixedFunction.glNormalPointer(gl, array); } + @Override public void glNormalPointer(int type, int stride, java.nio.Buffer pointer) { glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, GLBuffers.isGLTypeFixedPoint(type), stride, pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER)); } + @Override public void glNormalPointer(int type, int stride, long pointer_buffer_offset) { int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER); if(vboName==0) { @@ -411,6 +446,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER)); } + @Override public void glTexCoordPointer(GLArrayData array) { if(array.isVBO()) { if(!gl.glIsVBOArrayBound()) { @@ -426,11 +462,13 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } fixedFunction.glTexCoordPointer(gl, array); } + @Override public void glTexCoordPointer(int size, int type, int stride, java.nio.Buffer pointer) { glTexCoordPointer( GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, GLBuffers.isGLTypeFixedPoint(type), stride, pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER)); } + @Override public void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) { int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER); if(vboName==0) { @@ -441,6 +479,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER) ); } + @Override public final String toString() { StringBuilder buf = new StringBuilder(); buf.append(getClass().getName()+" ("); diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java index 187fdb309..42269588d 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java @@ -946,6 +946,7 @@ public class FixedFuncPipeline { sb.append("]"); return sb; } + @Override public String toString() { return toString(null, DEBUG).toString(); } diff --git a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java index 1833a1d87..d5b01ef54 100644 --- a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java +++ b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java @@ -140,6 +140,7 @@ public class JPEGDecoder { } } + @Override public final String toString() { return "JFIF[ver "+version+", density[units "+densityUnits+", "+xDensity+"x"+yDensity+"], thumb "+thumbWidth+"x"+thumbHeight+"]"; } @@ -172,6 +173,7 @@ public class JPEGDecoder { return null; } } + @Override public final String toString() { return "Adobe[ver "+version+", flags["+toHexString(flags0)+", "+toHexString(flags1)+"], colorSpace/Code "+colorSpace+"/"+toHexString(colorCode)+"]"; } @@ -190,6 +192,7 @@ public class JPEGDecoder { return null; } } + @Override public final String toString() { return "EXIF[]"; } @@ -362,6 +365,7 @@ public class JPEGDecoder { public final boolean hasCompID(int componentID) { return compIDs.contains(componentID); } + @Override public final String toString() { return "Frame[progressive "+progressive+", precision "+precision+", scanLines "+scanLines+", samplesPerLine "+samplesPerLine+ ", components[count "+compCount+", maxID "+maxCompID+", componentIDs "+compIDs+", comps "+Arrays.asList(comps)+"]]"; @@ -403,6 +407,7 @@ public class JPEGDecoder { return blocks[row][col]; } + @Override public final String toString() { return "CompIn[h "+h+", v "+v+", qttIdx "+qttIdx+", blocks["+blocksPerColumn+", mcu "+blocksPerColumnForMcu+"]["+blocksPerLine+", mcu "+blocksPerLineForMcu+"][64]]"; } @@ -426,11 +431,13 @@ public class JPEGDecoder { return lines.get( i < sz ? i : sz - 1); } + @Override public final String toString() { return "CompOut[lines "+lines.size()+", scale "+scaleX+"x"+scaleY+"]"; } } + @Override public String toString() { final String jfifS = null != jfif ? jfif.toString() : "JFIF nil"; final String exifS = null != exif ? exif.toString() : "Exif nil"; @@ -1227,6 +1234,7 @@ public class JPEGDecoder { final DecoderFunction decodeACSuccessive = new ACSuccessiveDecoder(); class BaselineDecoder implements DecoderFunction { + @Override public void decode(ComponentIn component, int[] zz) throws IOException { final int t = decodeHuffman(component.huffmanTableDC); final int diff = ( t == 0 ) ? 0 : receiveAndExtend(t); @@ -1250,6 +1258,7 @@ public class JPEGDecoder { } } class DCFirstDecoder implements DecoderFunction { + @Override public void decode(ComponentIn component, int[] zz) throws IOException { final int t = decodeHuffman(component.huffmanTableDC); final int diff = ( t == 0 ) ? 0 : (receiveAndExtend(t) << successive); @@ -1257,12 +1266,14 @@ public class JPEGDecoder { } } class DCSuccessiveDecoder implements DecoderFunction { + @Override public void decode(ComponentIn component, int[] zz) throws IOException { zz[0] |= readBit() << successive; } } class ACFirstDecoder implements DecoderFunction { + @Override public void decode(ComponentIn component, int[] zz) throws IOException { if (eobrun > 0) { eobrun--; @@ -1288,6 +1299,7 @@ public class JPEGDecoder { } } class ACSuccessiveDecoder implements DecoderFunction { + @Override public void decode(ComponentIn component, int[] zz) throws IOException { int k = spectralStart, e = spectralEnd, r = 0; while (k <= e) { diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java index 906ce6373..e6afd8694 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java @@ -315,6 +315,7 @@ public class ImageLine { /**
* Basic info
*/
+ @Override
public String toString() {
return "row=" + rown + " cols=" + imgInfo.cols + " bpc=" + imgInfo.bitDepth + " size=" + scanline.length;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java index 438a69984..4636c3955 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java @@ -92,6 +92,7 @@ public class ImageLineHelper { public double[] maxdif = { BIG_VALUE_NEG, BIG_VALUE_NEG, BIG_VALUE_NEG, BIG_VALUE }; // maxima
public final int channels; // diferencia
+ @Override
public String toString() {
return channels == 3 ? String.format(
"prom=%.1f (%.1f %.1f %.1f) max=%.1f (%.1f %.1f %.1f) min=%.1f (%.1f %.1f %.1f)", promlum, prom[0],
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java b/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java index 1f598a5de..9e64c3eb1 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java @@ -186,6 +186,7 @@ public class PngHelperInternal { }
private static final ThreadLocal<CRC32> crcProvider = new ThreadLocal<CRC32>() {
+ @Override
protected CRC32 initialValue() {
return new CRC32();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java b/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java index 73442e0bb..0412beb8c 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java @@ -994,6 +994,7 @@ public class PngReader { /** * Basic info, for debugging. */ + @Override public String toString() { // basic info return "filename=" + filename + " " + imgInfo.toString(); } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java index 82abb902d..4e8bf5635 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java @@ -47,12 +47,14 @@ public class ChunkHelper { public static final String zTXt = "zTXt"; private static final ThreadLocal<Inflater> inflaterProvider = new ThreadLocal<Inflater>() { + @Override protected Inflater initialValue() { return new Inflater(); } }; private static final ThreadLocal<Deflater> deflaterProvider = new ThreadLocal<Deflater>() { + @Override protected Deflater initialValue() { return new Deflater(); } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java index 3aba26cca..dcb1958df 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java @@ -108,6 +108,7 @@ public class ChunkRaw { return new ByteArrayInputStream(data);
}
+ @Override
public String toString() {
return "chunkid=" + ChunkHelper.toString(idbytes) + " len=" + len;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java index 3e0d03051..75107d761 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java @@ -59,12 +59,14 @@ public class ChunksList { protected static List<PngChunk> getXById(final List<PngChunk> list, final String id, final String innerid) {
if (innerid == null)
return ChunkHelper.filterList(list, new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c) {
return c.id.equals(id);
}
});
else
return ChunkHelper.filterList(list, new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c) {
if (!c.id.equals(id))
return false;
@@ -152,12 +154,14 @@ public class ChunksList { */
public List<PngChunk> getEquivalent(final PngChunk c2) {
return ChunkHelper.filterList(chunks, new ChunkPredicate() {
+ @Override
public boolean match(PngChunk c) {
return ChunkHelper.equivalent(c, c2);
}
});
}
+ @Override
public String toString() {
return "ChunkList: read: " + chunks.size();
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java index 3b84ab800..c502e9071 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java @@ -149,6 +149,7 @@ public class ChunksListForWrite extends ChunksList { return queuedChunks; } + @Override public String toString() { return "ChunkList: written: " + chunks.size() + " queue: " + queuedChunks.size(); } @@ -156,6 +157,7 @@ public class ChunksListForWrite extends ChunksList { /** * for debugging */ + @Override public String toStringFull() { StringBuilder sb = new StringBuilder(toString()); sb.append("\n Written:\n"); diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java index 5247169e0..7df5ba021 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java @@ -12,6 +12,7 @@ public abstract class PngChunkSingle extends PngChunk { super(id, imgInfo);
}
+ @Override
public final boolean allowsMultiple() {
return false;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java index fa3649613..139603448 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java @@ -41,6 +41,7 @@ public class PngMetadata { throw new PngjException("cannot set chunk : readonly metadata"); if (lazyOverwrite) { ChunkHelper.trimList(cl.getQueuedChunks(), new ChunkPredicate() { + @Override public boolean match(PngChunk c2) { return ChunkHelper.equivalent(c, c2); } |