X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FPlatform.java;h=00b00d2c8ea07bbc1bacbabd8cf9cca0e5e58d9e;hb=0b0673bbc7f06c5d5418d5ab7ad5961a464e2de0;hp=9216dcb21e519344ac9c9654cca4e24bec77521f;hpb=40e5508f9067514d947e1064dc99669a2670be9e;p=org.ibex.core.git diff --git a/src/org/xwt/Platform.java b/src/org/xwt/Platform.java index 9216dcb..00b00d2 100644 --- a/src/org/xwt/Platform.java +++ b/src/org/xwt/Platform.java @@ -34,7 +34,7 @@ public class Platform { static boolean alreadyDetectedProxy = false; /** the result of proxy autodetection */ - static HTTP.Proxy cachedProxyInfo = null; + static org.xwt.HTTP.Proxy cachedProxyInfo = null; /** the current build */ public static String build = "unknown"; @@ -66,10 +66,9 @@ public class Platform { else if (!version.startsWith("1.0") && !version.startsWith("1.1")) platform_class = "Java2"; /* - // Disable 2d hardware acceleration on Jaguar - if (os_name.equals("Mac OS X") && os_version.equals("10.2")) + // Disable 2d hardware acceleration on Jaguar + if (os_name.equals("Mac OS X") && os_version.startsWith("10.2")) System.setProperty("com.apple.hwaccel", "false"); */ - System.setProperty("com.apple.hwaccel", "false"); if (platform_class != null) { platform = (Platform)Class.forName("org.xwt.plat." + platform_class).newInstance(); @@ -124,18 +123,15 @@ public class Platform { /** creates and returns a picture */ public static Picture createPicture(int[] data, int w, int h) { return platform._createPicture(data, w, h); } + public static Picture createAlphaOnlyPicture(byte[] data, int w, int h) { return platform._createAlphaOnlyPicture(data, w, h); } + protected Picture _createPicture(int[] b, int w, int h) { return null; } - - /** creates a socket object */ - public static Socket getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException { - return platform._getSocket(host, port, ssl, negotiate); - } - protected Socket _getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException { - Socket ret = ssl ? new TinySSL(host, port, negotiate) : new Socket(java.net.InetAddress.getByName(host), port); - ret.setTcpNoDelay(true); - return ret; + protected Picture _createAlphaOnlyPicture(byte[] b, int w, int h) { + int[] b2 = new int[b.length]; + for(int i=0;i