Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1890)

Unified Diff: talk/app/webrtc/java/android/org/webrtc/EglBase10.java

Issue 1615153002: Change PeerConnectionFactory.setVideoHwAccelerationOptions to create shared Egl context for harware… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added eglbase_jni to avoid code duplication. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/java/android/org/webrtc/EglBase10.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase10.java b/talk/app/webrtc/java/android/org/webrtc/EglBase10.java
index f2aa9857faf09e223f40c610ab816d3f8969f84c..d11292d58e1f8ca28ff9074da3f99f1005176753 100644
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase10.java
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase10.java
@@ -286,6 +286,9 @@ final class EglBase10 extends EglBase {
// Return an EGLConfig, or die trying.
private EGLContext createEglContext(
Context sharedContext, EGLDisplay eglDisplay, EGLConfig eglConfig) {
+ if (sharedContext != null && sharedContext.eglContext == EGL10.EGL_NO_CONTEXT) {
+ throw new RuntimeException("Invalid sharedContext");
+ }
int[] contextAttributes = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE};
EGLContext rootContext =
sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext;
« no previous file with comments | « talk/app/webrtc/java/android/org/webrtc/EglBase.java ('k') | talk/app/webrtc/java/android/org/webrtc/EglBase14.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698