diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-08-08 01:47:28 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-08-08 18:23:59 -0700 |
commit | 1296c63bf14af034a90d5579ff301d1a2b70e34a (patch) | |
tree | 0cfe801c21cd98bcfeecc6a673e875a69ae538a9 /opengl | |
parent | 5d728bb9ff8c6ad89d5a1b88b2804f954d45d763 (diff) | |
download | frameworks_base-1296c63bf14af034a90d5579ff301d1a2b70e34a.zip frameworks_base-1296c63bf14af034a90d5579ff301d1a2b70e34a.tar.gz frameworks_base-1296c63bf14af034a90d5579ff301d1a2b70e34a.tar.bz2 |
Enable use of Surface as a native window in EGL14 wrapper.
Change-Id: Ia3546fd02f9b60d4505fbc0602522b95e3e5b6be
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/java/android/opengl/EGL14.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java index 4cdc272..cd53c17 100644 --- a/opengl/java/android/opengl/EGL14.java +++ b/opengl/java/android/opengl/EGL14.java @@ -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."); } |