mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Default to OpenGL 3.0 context in DVFP
OpenGL ES 3.0 likely can be used since Android 18. Moving to a higher version context more often can make sharing GL context easier for apps PiperOrigin-RevId: 667915331
This commit is contained in:
parent
563eb963fd
commit
c4930c4bb6
@ -20,7 +20,6 @@ import static androidx.media3.common.util.Assertions.checkNotNull;
|
|||||||
import static androidx.media3.common.util.Assertions.checkState;
|
import static androidx.media3.common.util.Assertions.checkState;
|
||||||
import static androidx.media3.common.util.Assertions.checkStateNotNull;
|
import static androidx.media3.common.util.Assertions.checkStateNotNull;
|
||||||
import static androidx.media3.common.util.GlUtil.getDefaultEglDisplay;
|
import static androidx.media3.common.util.GlUtil.getDefaultEglDisplay;
|
||||||
import static androidx.media3.common.util.Util.SDK_INT;
|
|
||||||
import static androidx.media3.effect.DebugTraceUtil.COMPONENT_VFP;
|
import static androidx.media3.effect.DebugTraceUtil.COMPONENT_VFP;
|
||||||
import static androidx.media3.effect.DebugTraceUtil.EVENT_RECEIVE_END_OF_ALL_INPUT;
|
import static androidx.media3.effect.DebugTraceUtil.EVENT_RECEIVE_END_OF_ALL_INPUT;
|
||||||
import static androidx.media3.effect.DebugTraceUtil.EVENT_REGISTER_NEW_INPUT_STREAM;
|
import static androidx.media3.effect.DebugTraceUtil.EVENT_REGISTER_NEW_INPUT_STREAM;
|
||||||
@ -1118,11 +1117,6 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
|||||||
private static Pair<EGLContext, EGLSurface> createFocusedEglContextWithFallback(
|
private static Pair<EGLContext, EGLSurface> createFocusedEglContextWithFallback(
|
||||||
GlObjectsProvider glObjectsProvider, EGLDisplay eglDisplay, int[] configAttributes)
|
GlObjectsProvider glObjectsProvider, EGLDisplay eglDisplay, int[] configAttributes)
|
||||||
throws GlUtil.GlException {
|
throws GlUtil.GlException {
|
||||||
if (SDK_INT < 29) {
|
|
||||||
return createFocusedEglContext(
|
|
||||||
glObjectsProvider, eglDisplay, /* openGlVersion= */ 2, configAttributes);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return createFocusedEglContext(
|
return createFocusedEglContext(
|
||||||
glObjectsProvider, eglDisplay, /* openGlVersion= */ 3, configAttributes);
|
glObjectsProvider, eglDisplay, /* openGlVersion= */ 3, configAttributes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user