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

Unified Diff: webrtc/api/java/android/org/webrtc/EglBase10.java

Issue 1937933002: Android EGL: Synchronize calls to eglCreateContext (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | webrtc/api/java/android/org/webrtc/EglBase14.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/android/org/webrtc/EglBase10.java
diff --git a/webrtc/api/java/android/org/webrtc/EglBase10.java b/webrtc/api/java/android/org/webrtc/EglBase10.java
index 70f9eb73a65ff871574d9d72aa90567a0a0d1573..8a95b03eaf263d74f723d202ed42da9b68994053 100644
--- a/webrtc/api/java/android/org/webrtc/EglBase10.java
+++ b/webrtc/api/java/android/org/webrtc/EglBase10.java
@@ -289,8 +289,10 @@ final class EglBase10 extends EglBase {
int[] contextAttributes = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE};
EGLContext rootContext =
sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext;
- EGLContext eglContext =
- egl.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttributes);
+ final EGLContext eglContext;
+ synchronized (EglBase.lock) {
+ eglContext = egl.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttributes);
+ }
if (eglContext == EGL10.EGL_NO_CONTEXT) {
throw new RuntimeException("Failed to create EGL context");
}
« no previous file with comments | « no previous file | webrtc/api/java/android/org/webrtc/EglBase14.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698