Chromium Code Reviews| Index: webrtc/api/android/java/src/org/webrtc/EglBase.java |
| diff --git a/webrtc/api/android/java/src/org/webrtc/EglBase.java b/webrtc/api/android/java/src/org/webrtc/EglBase.java |
| index 05dd8060d45c5edd347100de051010475ab4e41c..12fe118c0ca6aefa16ac34ad42981e0cddd9638f 100644 |
| --- a/webrtc/api/android/java/src/org/webrtc/EglBase.java |
| +++ b/webrtc/api/android/java/src/org/webrtc/EglBase.java |
| @@ -15,15 +15,13 @@ import android.view.Surface; |
| import javax.microedition.khronos.egl.EGL10; |
| - |
| /** |
| * Holds EGL state and utility methods for handling an egl 1.0 EGLContext, an EGLDisplay, |
| * and an EGLSurface. |
| */ |
| public abstract class EglBase { |
| // EGL wrapper for an actual EGLContext. |
| - public static class Context { |
| - } |
| + public static class Context {} |
| // According to the documentation, EGL can be used from multiple threads at the same time if each |
| // thread has its own EGLContext, but in practice it deadlocks on some devices when doing this. |
| @@ -39,54 +37,28 @@ public abstract class EglBase { |
| // Android-specific extension. |
| private static final int EGL_RECORDABLE_ANDROID = 0x3142; |
| - public static final int[] CONFIG_PLAIN = { |
| - EGL10.EGL_RED_SIZE, 8, |
| - EGL10.EGL_GREEN_SIZE, 8, |
| - EGL10.EGL_BLUE_SIZE, 8, |
| - EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| - EGL10.EGL_NONE |
| - }; |
| - public static final int[] CONFIG_RGBA = { |
| - EGL10.EGL_RED_SIZE, 8, |
| - EGL10.EGL_GREEN_SIZE, 8, |
| - EGL10.EGL_BLUE_SIZE, 8, |
| - EGL10.EGL_ALPHA_SIZE, 8, |
| - EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| - EGL10.EGL_NONE |
| - }; |
| - public static final int[] CONFIG_PIXEL_BUFFER = { |
| - EGL10.EGL_RED_SIZE, 8, |
| - EGL10.EGL_GREEN_SIZE, 8, |
| - EGL10.EGL_BLUE_SIZE, 8, |
| - EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| - EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT, |
| - EGL10.EGL_NONE |
| - }; |
| - public static final int[] CONFIG_PIXEL_RGBA_BUFFER = { |
| - EGL10.EGL_RED_SIZE, 8, |
| - EGL10.EGL_GREEN_SIZE, 8, |
| - EGL10.EGL_BLUE_SIZE, 8, |
| - EGL10.EGL_ALPHA_SIZE, 8, |
| - EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| - EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT, |
| - EGL10.EGL_NONE |
| - }; |
| - public static final int[] CONFIG_RECORDABLE = { |
| - EGL10.EGL_RED_SIZE, 8, |
| - EGL10.EGL_GREEN_SIZE, 8, |
| - EGL10.EGL_BLUE_SIZE, 8, |
| - EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| - EGL_RECORDABLE_ANDROID, 1, |
| - EGL10.EGL_NONE |
| - }; |
| + public static final int[] CONFIG_PLAIN = {EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, |
|
magjed_webrtc
2016/09/28 13:45:04
I don't like this change. Revert it manually and a
|
| + EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL10.EGL_NONE}; |
| + public static final int[] CONFIG_RGBA = {EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, |
| + EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_ALPHA_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, |
| + EGL_OPENGL_ES2_BIT, EGL10.EGL_NONE}; |
| + public static final int[] CONFIG_PIXEL_BUFFER = {EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, |
| + EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL10.EGL_SURFACE_TYPE, |
| + EGL10.EGL_PBUFFER_BIT, EGL10.EGL_NONE}; |
| + public static final int[] CONFIG_PIXEL_RGBA_BUFFER = {EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, |
| + 8, EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_ALPHA_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, |
| + EGL_OPENGL_ES2_BIT, EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT, EGL10.EGL_NONE}; |
| + public static final int[] CONFIG_RECORDABLE = {EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, |
| + EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_RECORDABLE_ANDROID, |
| + 1, EGL10.EGL_NONE}; |
| // Create a new context with the specified config attributes, sharing data with sharedContext. |
| // |sharedContext| can be null. |
| public static EglBase create(Context sharedContext, int[] configAttributes) { |
| return (EglBase14.isEGL14Supported() |
| - && (sharedContext == null || sharedContext instanceof EglBase14.Context)) |
| - ? new EglBase14((EglBase14.Context) sharedContext, configAttributes) |
| - : new EglBase10((EglBase10.Context) sharedContext, configAttributes); |
| + && (sharedContext == null || sharedContext instanceof EglBase14.Context)) |
| + ? new EglBase14((EglBase14.Context) sharedContext, configAttributes) |
| + : new EglBase10((EglBase10.Context) sharedContext, configAttributes); |
| } |
| public static EglBase create() { |