X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FGCJ.java;h=dc0da01b1fb7abd51f23a66e16dad88cce19b510;hb=6648a20efb79368af2fb16d1694afa685c04a0fc;hp=f9235161e2bab661ea738b0eb7a1a07192fc179d;hpb=1e651bf5d79cc35fa6212766ed4a958cb265fad0;p=org.ibex.core.git diff --git a/src/org/xwt/plat/GCJ.java b/src/org/xwt/plat/GCJ.java index f923516..dc0da01 100644 --- a/src/org/xwt/plat/GCJ.java +++ b/src/org/xwt/plat/GCJ.java @@ -1,4 +1,4 @@ -// Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] +// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] package org.xwt.plat; import org.xwt.*; @@ -19,41 +19,11 @@ public abstract class GCJ extends Platform { private static Class c8 = gnu.java.locale.Calendar_en.class; private static Class c9 = gnu.java.locale.Calendar_en_US.class; - protected org.xwt.Weak _getWeak(Object o) { return new Java2Weak(o); } - protected native InputStream _getBuiltinInputStream(); - protected native InputStream _getFreetypeInputStream(); - private static class Java2Weak extends java.lang.ref.WeakReference implements org.xwt.Weak { - public Java2Weak(Object o) { super(o); } - } - - // FIXME - protected ImageDecoder _decodeJPEG(InputStream is, String name) { - try { - return new JPEG(is); - } catch (Exception e) { - Log.log(this, "Exception while decoding JPEG image " + name); - Log.log(this, e); - return null; - } - } + protected native void _decodeJPEG(InputStream is, Picture p); - /** Converts an InputStream carrying a JPEG image into an ARGB int[] */ - private static class JPEG extends ImageDecoder { - int[] data; - byte[] buffer; - int width, height; - InputStream is; - - public final int[] getData() { return data; } - public final int getWidth() { return width; } - public final int getHeight() { return height; } - private JPEG(InputStream is) { this.is = is; nativeDecompress(); buffer = null; } - private native void nativeDecompress(); - } - - // FIXME: This could be optimized (a lot) by using a custom hashtable + // FEATURE: This could be optimized (a lot) by using a custom hashtable public final static class Retainer { private static Hash table = new Hash(); private final static class Key {