Fix recreation of DefaultShaderProgram in FinalWrapper

`outputSurfaceInfoChanged` is not reset when `defaultShaderProgram` is null.
That is, on the first time `ensureConfigured()` is called with output size
changed, `outputSurfaceInfoChanged` is not set to false after creating the
`defaultShaderProgram`, and `defaultShaderProgram` will be created again on the
second time `ensureConfigured()` is called.

PiperOrigin-RevId: 537870404
This commit is contained in:
claincly 2023-06-05 14:32:57 +00:00 committed by Tofunmi Adigun-Hameed
parent 4306e0bb82
commit 133943a635

View File

@ -461,14 +461,15 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
defaultShaderProgram = null;
outputSurfaceInfoChanged = false;
}
if (defaultShaderProgram == null) {
defaultShaderProgram =
createDefaultShaderProgram(
outputSurfaceInfo == null ? 0 : outputSurfaceInfo.orientationDegrees,
outputWidth,
outputHeight);
outputSurfaceInfoChanged = false;
}
return true;
}