Skip to content

Commit a130046

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge "Enable use of Surface as a native window in EGL14 wrapper." into jb-mr1-dev
2 parents 1670dc9 + 1296c63 commit a130046

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opengl/java/android/opengl/EGL14.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ public static EGLSurface eglCreateWindowSurface(EGLDisplay dpy,
248248
} else if (win instanceof SurfaceHolder) {
249249
SurfaceHolder holder = (SurfaceHolder)win;
250250
sur = holder.getSurface();
251+
} else if (win instanceof Surface) {
252+
sur = (Surface) win;
251253
}
252254

253255
EGLSurface surface;
@@ -259,7 +261,7 @@ public static EGLSurface eglCreateWindowSurface(EGLDisplay dpy,
259261
} else {
260262
throw new java.lang.UnsupportedOperationException(
261263
"eglCreateWindowSurface() can only be called with an instance of " +
262-
"SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
264+
"Surface, SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
263265
"this will be fixed later.");
264266
}
265267

0 commit comments

Comments
 (0)