diff options
author | Romain Guy <romainguy@google.com> | 2012-07-24 16:24:56 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2012-07-24 16:41:21 -0700 |
commit | 786fc93d71b833ab6b02b0c7ea5e30f25cceeedf (patch) | |
tree | 7a33afdfc52077e9f9665acc6d6072cb23e3d9d2 /opengl | |
parent | d8031f0e8c0977ff04aeb2164afacb2434dc0775 (diff) | |
download | frameworks_base-786fc93d71b833ab6b02b0c7ea5e30f25cceeedf.zip frameworks_base-786fc93d71b833ab6b02b0c7ea5e30f25cceeedf.tar.gz frameworks_base-786fc93d71b833ab6b02b0c7ea5e30f25cceeedf.tar.bz2 |
Make HardwareRenderer able to target generic Surface objects
Change-Id: I4b7199a1eb30e0df354ae12c4819adc69db5df40
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/java/com/google/android/gles_jni/EGLImpl.java | 5 |
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) { |