mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Effect: Move common statement out of switch/case
PiperOrigin-RevId: 570323141
This commit is contained in:
parent
8953f26a5c
commit
fa51f8cd4d
1 changed files with 1 additions and 3 deletions
|
|
@ -111,7 +111,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
textureManager =
|
textureManager =
|
||||||
new ExternalTextureManager(
|
new ExternalTextureManager(
|
||||||
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
||||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
|
||||||
break;
|
break;
|
||||||
case INPUT_TYPE_BITMAP:
|
case INPUT_TYPE_BITMAP:
|
||||||
samplingShaderProgram =
|
samplingShaderProgram =
|
||||||
|
|
@ -128,7 +127,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
textureManager =
|
textureManager =
|
||||||
new BitmapTextureManager(
|
new BitmapTextureManager(
|
||||||
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
||||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
|
||||||
break;
|
break;
|
||||||
case INPUT_TYPE_TEXTURE_ID:
|
case INPUT_TYPE_TEXTURE_ID:
|
||||||
samplingShaderProgram =
|
samplingShaderProgram =
|
||||||
|
|
@ -145,11 +143,11 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
textureManager =
|
textureManager =
|
||||||
new TexIdTextureManager(
|
new TexIdTextureManager(
|
||||||
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
||||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new VideoFrameProcessingException("Unsupported input type " + inputType);
|
throw new VideoFrameProcessingException("Unsupported input type " + inputType);
|
||||||
}
|
}
|
||||||
|
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the {@link GlShaderProgram} that {@code InputSwitcher} outputs to. */
|
/** Sets the {@link GlShaderProgram} that {@code InputSwitcher} outputs to. */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue