summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-27 01:38:12 +0200
committerSven Gothel <[email protected]>2013-04-27 01:38:12 +0200
commit94ea306d1809290db678d3181619bdc39d4334bb (patch)
treecd61bb347f6980dbdc5d2aac86f59b4261c1325e /src/jogl/classes/jogamp/opengl
parentff9fb2d0adc81fdf25d6e26b91e1f67d8241e3e4 (diff)
Move JPEGDecoder.PixelStorage -> TextureData.ColorSink: Appropriate name + public use
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java
index 748e70d5b..8df147405 100644
--- a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java
+++ b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java
@@ -67,6 +67,7 @@ import jogamp.opengl.Debug;
import com.jogamp.common.util.ArrayHashSet;
import com.jogamp.common.util.VersionNumber;
import com.jogamp.opengl.util.texture.TextureData.ColorSpace;
+import com.jogamp.opengl.util.texture.TextureData.ColorSink;
/**
*
@@ -88,21 +89,6 @@ public class JPEGDecoder {
private static final boolean DEBUG = Debug.debug("JPEGImage");
private static final boolean DEBUG_IN = false;
- public static interface PixelStorage {
- /**
- * @param width
- * @param height
- * @param sourceCS the color-space of the decoded JPEG
- * @param sourceComponents number of components used for the given source color-space
- * @return Either {@link ColorSpace#RGB} or {@link ColorSpace#YCbCr}. {@link ColorSpace#YCCK} and {@link ColorSpace#CMYK} will throw an exception!
- * @throws RuntimeException
- */
- public ColorSpace allocate(int width, int height, ColorSpace sourceCS, int sourceComponents) throws RuntimeException;
- public void store2(int x, int y, byte c1, byte c2);
- public void storeRGB(int x, int y, byte r, byte g, byte b);
- public void storeYCbCr(int x, int y, byte Y, byte Cb, byte Cr);
- }
-
public static class JFIF {
final VersionNumber version;
final int densityUnits;
@@ -1347,7 +1333,7 @@ public class JPEGDecoder {
pixelStorage.storeRGB(x, y, (byte)R, (byte)G, (byte)B);
} */
- public synchronized void getPixel(PixelStorage pixelStorage, int width, int height) {
+ public synchronized void getPixel(ColorSink pixelStorage, int width, int height) {
final int scaleX = this.width / width, scaleY = this.height / height;
final int componentCount = this.components.length;