aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-01-27 11:24:27 -0800
committerHarvey Harrison <[email protected]>2012-01-27 11:24:27 -0800
commitf866ade7366d8710d17e9d75a75315043ed095da (patch)
tree70f876e3e97ca77ac55eeea5c284f656270a2fe6 /src
parent3b050374919eb89d0b1a153659a1edb0d7d320d4 (diff)
j3dcore: annotate the ThreadLocals in JoglPipeline
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/classes/jogl/javax/media/j3d/JoglPipeline.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java
index 6d06822..8d24a36 100644
--- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java
+++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java
@@ -9271,13 +9271,13 @@ class JoglPipeline extends Pipeline {
// General helper routines
//
- private static ThreadLocal nioVertexTemp = new ThreadLocal();
- private static ThreadLocal nioVertexDoubleTemp = new ThreadLocal();
- private static ThreadLocal nioColorTemp = new ThreadLocal();
- private static ThreadLocal nioColorByteTemp = new ThreadLocal();
- private static ThreadLocal nioNormalTemp = new ThreadLocal();
- private static ThreadLocal nioTexCoordSetTemp = new ThreadLocal();
- private static ThreadLocal nioVertexAttrSetTemp = new ThreadLocal();
+ private static ThreadLocal<FloatBuffer> nioVertexTemp = new ThreadLocal<FloatBuffer>();
+ private static ThreadLocal<DoubleBuffer> nioVertexDoubleTemp = new ThreadLocal<DoubleBuffer>();
+ private static ThreadLocal<FloatBuffer> nioColorTemp = new ThreadLocal<FloatBuffer>();
+ private static ThreadLocal<ByteBuffer> nioColorByteTemp = new ThreadLocal<ByteBuffer>();
+ private static ThreadLocal<FloatBuffer> nioNormalTemp = new ThreadLocal<FloatBuffer>();
+ private static ThreadLocal<FloatBuffer[]> nioTexCoordSetTemp = new ThreadLocal<FloatBuffer[]>();
+ private static ThreadLocal<FloatBuffer[]> nioVertexAttrSetTemp = new ThreadLocal<FloatBuffer[]>();
private static FloatBuffer getVertexArrayBuffer(float[] vertexArray) {
return getVertexArrayBuffer(vertexArray, true);
@@ -9327,11 +9327,11 @@ class JoglPipeline extends Pipeline {
return getNIOBuffer(vertexAttrSet, nioVertexAttrSetTemp);
}
- private static FloatBuffer getNIOBuffer(float[] array, ThreadLocal threadLocal, boolean copyData) {
+ private static FloatBuffer getNIOBuffer(float[] array, ThreadLocal<FloatBuffer> threadLocal, boolean copyData) {
if (array == null) {
return null;
}
- FloatBuffer buf = (FloatBuffer) threadLocal.get();
+ FloatBuffer buf = threadLocal.get();
if (buf == null) {
buf = BufferUtil.newFloatBuffer(array.length);
threadLocal.set(buf);
@@ -9350,11 +9350,11 @@ class JoglPipeline extends Pipeline {
return buf;
}
- private static DoubleBuffer getNIOBuffer(double[] array, ThreadLocal threadLocal, boolean copyData) {
+ private static DoubleBuffer getNIOBuffer(double[] array, ThreadLocal<DoubleBuffer> threadLocal, boolean copyData) {
if (array == null) {
return null;
}
- DoubleBuffer buf = (DoubleBuffer) threadLocal.get();
+ DoubleBuffer buf = threadLocal.get();
if (buf == null) {
buf = BufferUtil.newDoubleBuffer(array.length);
threadLocal.set(buf);
@@ -9373,11 +9373,11 @@ class JoglPipeline extends Pipeline {
return buf;
}
- private static ByteBuffer getNIOBuffer(byte[] array, ThreadLocal threadLocal, boolean copyData) {
+ private static ByteBuffer getNIOBuffer(byte[] array, ThreadLocal<ByteBuffer> threadLocal, boolean copyData) {
if (array == null) {
return null;
}
- ByteBuffer buf = (ByteBuffer) threadLocal.get();
+ ByteBuffer buf = threadLocal.get();
if (buf == null) {
buf = BufferUtil.newByteBuffer(array.length);
threadLocal.set(buf);
@@ -9396,11 +9396,11 @@ class JoglPipeline extends Pipeline {
return buf;
}
- private static FloatBuffer[] getNIOBuffer(Object[] array, ThreadLocal threadLocal) {
+ private static FloatBuffer[] getNIOBuffer(Object[] array, ThreadLocal<FloatBuffer[]> threadLocal) {
if (array == null) {
return null;
}
- FloatBuffer[] bufs = (FloatBuffer[]) threadLocal.get();
+ FloatBuffer[] bufs = threadLocal.get();
// First resize array of FloatBuffers
if (bufs == null) {