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

Unified Diff: webrtc/api/java/android/org/webrtc/EglBase14.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 | « webrtc/api/java/android/org/webrtc/EglBase10.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/android/org/webrtc/EglBase14.java
diff --git a/webrtc/api/java/android/org/webrtc/EglBase14.java b/webrtc/api/java/android/org/webrtc/EglBase14.java
index 6b406228ce071e20693a1908d9344ebbda45fdb5..71d6d99873616c2dccd36a4f29170caa1641ac32 100644
--- a/webrtc/api/java/android/org/webrtc/EglBase14.java
+++ b/webrtc/api/java/android/org/webrtc/EglBase14.java
@@ -246,8 +246,10 @@ public final class EglBase14 extends EglBase {
int[] contextAttributes = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE};
EGLContext rootContext =
sharedContext == null ? EGL14.EGL_NO_CONTEXT : sharedContext.egl14Context;
- EGLContext eglContext =
- EGL14.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttributes, 0);
+ final EGLContext eglContext;
+ synchronized (EglBase.lock) {
+ eglContext = EGL14.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttributes, 0);
+ }
if (eglContext == EGL14.EGL_NO_CONTEXT) {
throw new RuntimeException("Failed to create EGL context");
}
« no previous file with comments | « webrtc/api/java/android/org/webrtc/EglBase10.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698