mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
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 (cherry picked from commit 133943a63520fbc872c3960647144fde8a918df8)
This commit is contained in:
parent
a8dbea74ce
commit
39ec69fe66
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user