From 1296c63bf14af034a90d5579ff301d1a2b70e34a Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 8 Aug 2012 01:47:28 -0700 Subject: [PATCH] Enable use of Surface as a native window in EGL14 wrapper. Change-Id: Ia3546fd02f9b60d4505fbc0602522b95e3e5b6be --- opengl/java/android/opengl/EGL14.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java index 4cdc272845241..cd53c1757faa9 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."); }