perf: avoid preview session recreation on LUT state change

This commit is contained in:
zhoubinjia committed 2026-11-20 18:46:08 +08:00
1 parent 0a8a11defe
commit d335dab351
1 file changed
-2
@@ -7156,13 +7156,11 @@ class Camera2Controller(private val context: Context) {
fun setLutEnabled(enabled: Boolean) {
if (_state.value.lutEnabled == enabled) return
_state.value = _state.value.copy(lutEnabled = enabled)
createPreviewSession()
}
fun setLogLutActive(isLogLut: Boolean) {
if (_state.value.isLogLutActive == isLogLut) return
_state.value = _state.value.copy(isLogLutActive = isLogLut)
createPreviewSession()
}
fun setCaptureMode(mode: CaptureMode) {