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

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

Issue 1396013004: Android: Replace EGL14 with EGL10 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add comments for hardcoded EGL constants Created 5 years, 2 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/VideoRendererGui.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java b/talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java
index edb9fd69dcc416e93ced3c9fa55cd637d3c1a844..bacd0cf11fd03445a4768577707cfcec27878e1c 100644
--- a/talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java
+++ b/talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java
@@ -31,14 +31,14 @@ import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.egl.EGL10;
+import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.opengles.GL10;
import android.annotation.SuppressLint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
-import android.opengl.EGL14;
-import android.opengl.EGLContext;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
@@ -71,11 +71,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
private final ArrayList<YuvImageRenderer> yuvImageRenderers;
// |drawer| is synchronized on |yuvImageRenderers|.
private GlRectDrawer drawer;
- private static final int EGL14_SDK_VERSION =
- android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
- // Current SDK version.
- private static final int CURRENT_SDK_VERSION =
- android.os.Build.VERSION.SDK_INT;
// Render and draw threads.
private static Thread renderFrameThread;
private static Thread drawThread;
@@ -612,11 +607,9 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
public void onSurfaceCreated(GL10 unused, EGLConfig config) {
Logging.d(TAG, "VideoRendererGui.onSurfaceCreated");
// Store render EGL context.
- if (CURRENT_SDK_VERSION >= EGL14_SDK_VERSION) {
- synchronized (VideoRendererGui.class) {
- eglContext = EGL14.eglGetCurrentContext();
- Logging.d(TAG, "VideoRendererGui EGL Context: " + eglContext);
- }
+ synchronized (VideoRendererGui.class) {
+ eglContext = ((EGL10) EGLContext.getEGL()).eglGetCurrentContext();
+ Logging.d(TAG, "VideoRendererGui EGL Context: " + eglContext);
}
synchronized (yuvImageRenderers) {
« no previous file with comments | « talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java ('k') | talk/app/webrtc/java/jni/androidmediadecoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698