summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-07-24 16:45:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-07-24 17:21:56 -0700
commit63cf0752226383cfc8fa35a3233413301b49fab7 (patch)
tree8e70b1d375a4a612cee51434b29c4b5b24554ccc /opengl
parentf33efd9c06102a13ae96532e9db35a18ffe4366c (diff)
parent786fc93d71b833ab6b02b0c7ea5e30f25cceeedf (diff)
downloadframeworks_base-63cf0752226383cfc8fa35a3233413301b49fab7.zip
frameworks_base-63cf0752226383cfc8fa35a3233413301b49fab7.tar.gz
frameworks_base-63cf0752226383cfc8fa35a3233413301b49fab7.tar.bz2
Merge "Make HardwareRenderer able to target generic Surface objects"
Diffstat (limited to 'opengl')
-rw-r--r--opengl/java/com/google/android/gles_jni/EGLImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/opengl/java/com/google/android/gles_jni/EGLImpl.java b/opengl/java/com/google/android/gles_jni/EGLImpl.java
index 6992019..64a54c2 100644
--- a/opengl/java/com/google/android/gles_jni/EGLImpl.java
+++ b/opengl/java/com/google/android/gles_jni/EGLImpl.java
@@ -83,6 +83,8 @@ public class EGLImpl implements EGL10 {
} else if (native_window instanceof SurfaceHolder) {
SurfaceHolder holder = (SurfaceHolder)native_window;
sur = holder.getSurface();
+ } else if (native_window instanceof Surface) {
+ sur = (Surface) native_window;
}
int eglSurfaceId;
@@ -94,8 +96,7 @@ public class EGLImpl implements EGL10 {
} else {
throw new java.lang.UnsupportedOperationException(
"eglCreateWindowSurface() can only be called with an instance of " +
- "SurfaceView, SurfaceHolder or SurfaceTexture at the moment, " +
- "this will be fixed later.");
+ "Surface, SurfaceView, SurfaceHolder or SurfaceTexture at the moment.");
}
if (eglSurfaceId == 0) {