OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 } | 109 } |
110 | 110 |
111 /** | 111 /** |
112 * Explicitly create a root EGl 1.0 context with the specified config attribut es. | 112 * Explicitly create a root EGl 1.0 context with the specified config attribut es. |
113 */ | 113 */ |
114 public static EglBase createEgl10(int[] configAttributes) { | 114 public static EglBase createEgl10(int[] configAttributes) { |
115 return new EglBase10(null /* shaderContext */, configAttributes); | 115 return new EglBase10(null /* shaderContext */, configAttributes); |
116 } | 116 } |
117 | 117 |
118 /** | 118 /** |
119 * Explicitly create a root EGl 1.0 context with the specified config attribut es | |
120 * and shader context. | |
magjed_webrtc
2017/05/25 14:25:19
nit: shared, not shader.
Taylor Brandstetter
2017/05/25 16:53:57
Done; I saw "shaderContext" used in another place
| |
121 */ | |
122 public static EglBase createEgl10( | |
123 javax.microedition.khronos.egl.EGLContext sharedContext, int[] configAttri butes) { | |
124 return new EglBase10(new EglBase10.Context(sharedContext), configAttributes) ; | |
125 } | |
126 | |
127 /** | |
119 * Explicitly create a root EGl 1.4 context with the specified config attribut es. | 128 * Explicitly create a root EGl 1.4 context with the specified config attribut es. |
120 */ | 129 */ |
121 public static EglBase createEgl14(int[] configAttributes) { | 130 public static EglBase createEgl14(int[] configAttributes) { |
122 return new EglBase14(null /* shaderContext */, configAttributes); | 131 return new EglBase14(null /* shaderContext */, configAttributes); |
123 } | 132 } |
124 | 133 |
134 /** | |
135 * Explicitly create a root EGl 1.4 context with the specified config attribut es | |
136 * and shader context. | |
magjed_webrtc
2017/05/25 14:25:19
nit: shared, not shader.
| |
137 */ | |
138 public static EglBase createEgl14( | |
139 android.opengl.EGLContext sharedContext, int[] configAttributes) { | |
140 return new EglBase14(new EglBase14.Context(sharedContext), configAttributes) ; | |
141 } | |
142 | |
125 public abstract void createSurface(Surface surface); | 143 public abstract void createSurface(Surface surface); |
126 | 144 |
127 // Create EGLSurface from the Android SurfaceTexture. | 145 // Create EGLSurface from the Android SurfaceTexture. |
128 public abstract void createSurface(SurfaceTexture surfaceTexture); | 146 public abstract void createSurface(SurfaceTexture surfaceTexture); |
129 | 147 |
130 // Create dummy 1x1 pixel buffer surface so the context can be made current. | 148 // Create dummy 1x1 pixel buffer surface so the context can be made current. |
131 public abstract void createDummyPbufferSurface(); | 149 public abstract void createDummyPbufferSurface(); |
132 | 150 |
133 public abstract void createPbufferSurface(int width, int height); | 151 public abstract void createPbufferSurface(int width, int height); |
134 | 152 |
135 public abstract Context getEglBaseContext(); | 153 public abstract Context getEglBaseContext(); |
136 | 154 |
137 public abstract boolean hasSurface(); | 155 public abstract boolean hasSurface(); |
138 | 156 |
139 public abstract int surfaceWidth(); | 157 public abstract int surfaceWidth(); |
140 | 158 |
141 public abstract int surfaceHeight(); | 159 public abstract int surfaceHeight(); |
142 | 160 |
143 public abstract void releaseSurface(); | 161 public abstract void releaseSurface(); |
144 | 162 |
145 public abstract void release(); | 163 public abstract void release(); |
146 | 164 |
147 public abstract void makeCurrent(); | 165 public abstract void makeCurrent(); |
148 | 166 |
149 // Detach the current EGL context, so that it can be made current on another t hread. | 167 // Detach the current EGL context, so that it can be made current on another t hread. |
150 public abstract void detachCurrent(); | 168 public abstract void detachCurrent(); |
151 | 169 |
152 public abstract void swapBuffers(); | 170 public abstract void swapBuffers(); |
153 } | 171 } |
OLD | NEW |