From 786fc93d71b833ab6b02b0c7ea5e30f25cceeedf Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 24 Jul 2012 16:24:56 -0700 Subject: Make HardwareRenderer able to target generic Surface objects Change-Id: I4b7199a1eb30e0df354ae12c4819adc69db5df40 --- opengl/java/com/google/android/gles_jni/EGLImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'opengl/java/com') 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) { -- cgit v1.1