mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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;
|
defaultShaderProgram = null;
|
||||||
outputSurfaceInfoChanged = false;
|
outputSurfaceInfoChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultShaderProgram == null) {
|
if (defaultShaderProgram == null) {
|
||||||
defaultShaderProgram =
|
defaultShaderProgram =
|
||||||
createDefaultShaderProgram(
|
createDefaultShaderProgram(
|
||||||
outputSurfaceInfo == null ? 0 : outputSurfaceInfo.orientationDegrees,
|
outputSurfaceInfo == null ? 0 : outputSurfaceInfo.orientationDegrees,
|
||||||
outputWidth,
|
outputWidth,
|
||||||
outputHeight);
|
outputHeight);
|
||||||
|
outputSurfaceInfoChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue