Return EGL_NO_CONTEXT instead of throwing an exception.

Changes EglBase10.Context.getNativeEglContext to return EGL_NO_CONTEXT
instead of throwing a runtime exception.

Bug: webrtc:8257
Change-Id: I89fe630ada35d247f3a6c00b0cd2d7f0b445afa3
Reviewed-on: https://webrtc-review.googlesource.com/3260
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19953}
This commit is contained in:
Sami Kalliomäki
2017-09-25 16:54:42 +02:00
committed by Commit Bot
parent 39f499b1a4
commit ef36375582

View File

@ -15,7 +15,6 @@ import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.view.Surface;
import android.view.SurfaceHolder;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
@ -46,7 +45,7 @@ class EglBase10 extends EglBase {
// need to make sure to have an EglSurface, then make the context current using that surface,
// and then call into JNI and call the native version of eglGetCurrentContext. Then we need to
// restore the state and return the native context.
throw new RuntimeException("getNativeEglContext is not implemented for EGL 1.0");
return 0 /* EGL_NO_CONTEXT */;
}
public Context(EGLContext eglContext) {