diff --git a/webrtc/sdk/android/api/org/webrtc/EglBase.java b/webrtc/sdk/android/api/org/webrtc/EglBase.java index 3e221c2f47..619022c770 100644 --- a/webrtc/sdk/android/api/org/webrtc/EglBase.java +++ b/webrtc/sdk/android/api/org/webrtc/EglBase.java @@ -115,6 +115,15 @@ public abstract class EglBase { return new EglBase10(null /* shaderContext */, configAttributes); } + /** + * Explicitly create a root EGl 1.0 context with the specified config attributes + * and shared context. + */ + public static EglBase createEgl10( + javax.microedition.khronos.egl.EGLContext sharedContext, int[] configAttributes) { + return new EglBase10(new EglBase10.Context(sharedContext), configAttributes); + } + /** * Explicitly create a root EGl 1.4 context with the specified config attributes. */ @@ -122,6 +131,15 @@ public abstract class EglBase { return new EglBase14(null /* shaderContext */, configAttributes); } + /** + * Explicitly create a root EGl 1.4 context with the specified config attributes + * and shared context. + */ + public static EglBase createEgl14( + android.opengl.EGLContext sharedContext, int[] configAttributes) { + return new EglBase14(new EglBase14.Context(sharedContext), configAttributes); + } + public abstract void createSurface(Surface surface); // Create EGLSurface from the Android SurfaceTexture.