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

Unified Diff: talk/app/webrtc/java/android/org/webrtc/EglBase14.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/EglBase14.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase14.java b/talk/app/webrtc/java/android/org/webrtc/EglBase14.java
index c6f98c3b312691560b476d80e4977fc4a0bc9019..bda5ff468b9633029931ae1d0a05c3f52382c913 100644
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase14.java
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase14.java
@@ -241,6 +241,9 @@ final class EglBase14 extends EglBase {
// Return an EGLConfig, or die trying.
private static EGLContext createEglContext(
EglBase14.Context sharedContext, EGLDisplay eglDisplay, EGLConfig eglConfig) {
+ if (sharedContext != null && sharedContext.egl14Context == EGL14.EGL_NO_CONTEXT) {
+ throw new RuntimeException("Invalid sharedContext");
+ }
int[] contextAttributes = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE};
EGLContext rootContext =
sharedContext == null ? EGL14.EGL_NO_CONTEXT : sharedContext.egl14Context;
« no previous file with comments | « talk/app/webrtc/java/android/org/webrtc/EglBase10.java ('k') | talk/app/webrtc/java/jni/androidmediacodeccommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698