summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
authorMorris Meyer <[email protected]>2009-07-28 17:34:20 -0400
committerMorris Meyer <[email protected]>2009-07-28 17:39:14 -0400
commitb6d75cac68340878b20d35b23c8449c97ad9d819 (patch)
tree2cbd05b91739249458ea5f4e18556601ac2b9c2a /src/nativewindow/classes
parentd73af059e836943fa37b9f7aab93154f530763d9 (diff)
EGL changes for device
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java11
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java5
2 files changed, 14 insertions, 2 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
index b13cf4317..d054c205b 100644
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
+++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
@@ -40,7 +40,7 @@ import java.lang.reflect.*;
import javax.media.nativewindow.*;
public final class NWReflection {
- public static final boolean DEBUG = Debug.debug("NWReflection");
+ public static final boolean DEBUG = true; /* Debug.debug("NWReflection"); */
public static final boolean isClassAvailable(String clazzName) {
try {
@@ -69,7 +69,11 @@ public final class NWReflection {
try {
factory = factoryClass.getDeclaredConstructor( cstrArgTypes );
} catch(NoSuchMethodException nsme) {
- throw new NativeWindowException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found");
+ nsme.printStackTrace();
+ throw new NativeWindowException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found");
+ } catch (Throwable th) {
+ th.printStackTrace();
+ throw new NativeWindowException(th);
}
return factory;
} catch (Throwable e) {
@@ -91,6 +95,9 @@ public final class NWReflection {
factory = getConstructor(clazzName, cstrArgTypes);
return factory.newInstance( cstrArgs ) ;
} catch (Exception e) {
+ if (DEBUG) {
+ e.printStackTrace();
+ }
throw new NativeWindowException(e);
}
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index cbd485649..d4684c783 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -48,6 +48,9 @@ import com.sun.nativewindow.impl.jvm.JVMUtil;
public abstract class NativeWindowFactory {
protected static final boolean DEBUG = Debug.debug("NativeWindow");
+ /** Broadcom EGL type */
+ public static final String TYPE_BROADCOM_EGL = "BroadcomEGL";
+
/** OpenKODE/EGL type */
public static final String TYPE_EGL = "EGL";
@@ -82,6 +85,8 @@ public abstract class NativeWindowFactory {
private static String _getNativeWindowingType(String osNameLowerCase) {
if (osNameLowerCase.startsWith("kd")) {
return TYPE_EGL;
+ } else if (osNameLowerCase.startsWith(TYPE_BROADCOM_EGL.toLowerCase())) {
+ return TYPE_BROADCOM_EGL;
} else if (osNameLowerCase.startsWith("wind")) {
return TYPE_WINDOWS;
} else if (osNameLowerCase.startsWith("mac os x") ||