Reset input capacity when setting external shader program

Before this CL, externalShaderProgramInputCapacity was not reset when
the external shader program was reset (which occurs when  the
InputSwitcher switches to an input with a different ColorInfo). This is
due to a regression introduced in bef3d518d2.

PiperOrigin-RevId: 637869215
This commit is contained in:
kimvde 2024-05-28 05:52:30 -07:00 committed by Copybara-Service
parent 9622411b50
commit 0baa4ff621

View File

@ -191,6 +191,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
@Override
public void setSamplingGlShaderProgram(GlShaderProgram samplingGlShaderProgram) {
checkState(samplingGlShaderProgram instanceof ExternalShaderProgram);
externalShaderProgramInputCapacity.set(0);
this.externalShaderProgram = (ExternalShaderProgram) samplingGlShaderProgram;
}