Android: Add interface for getting native EGL context
This CL also implements support for getting the native context on EGL 1.4. It's a bit tricker to get the native handle for EGL 1.0 so it will be done in a separate CL. Bug: webrtc:8257 Change-Id: I269e75c357f19507098180077fa9d1b1ac4dce23 Reviewed-on: https://webrtc-review.googlesource.com/1880 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19890}
This commit is contained in:
committed by
Commit Bot
parent
6dc2038d0d
commit
aa568a64ed
@ -43,9 +43,17 @@ class EglBase14 extends EglBase {
|
||||
return (CURRENT_SDK_VERSION >= EGLExt_SDK_VERSION);
|
||||
}
|
||||
|
||||
public static class Context extends EglBase.Context {
|
||||
public static class Context implements EglBase.Context {
|
||||
private final android.opengl.EGLContext egl14Context;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public long getNativeEglContext() {
|
||||
return CURRENT_SDK_VERSION >= android.os.Build.VERSION_CODES.LOLLIPOP
|
||||
? egl14Context.getNativeHandle()
|
||||
: egl14Context.getHandle();
|
||||
}
|
||||
|
||||
public Context(android.opengl.EGLContext eglContext) {
|
||||
this.egl14Context = eglContext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user