mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00: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 133943a635)
This commit is contained in:
parent
a8dbea74ce
commit
39ec69fe66
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue