Enable use of Surface as a native window in EGL14 wrapper.

Change-Id: Ia3546fd02f9b60d4505fbc0602522b95e3e5b6be
This commit is contained in:
Jeff Brown
2012-08-08 01:47:28 -07:00
parent 5d728bb9ff
commit 1296c63bf1

View File

@@ -248,6 +248,8 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
} else if (win instanceof SurfaceHolder) {
SurfaceHolder holder = (SurfaceHolder)win;
sur = holder.getSurface();
} else if (win instanceof Surface) {
sur = (Surface) win;
}
EGLSurface surface;
@@ -259,7 +261,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
} else {
throw new java.lang.UnsupportedOperationException(
"eglCreateWindowSurface() can only be called with an instance of " +
"SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
"Surface, SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
"this will be fixed later.");
}