perf: avoid preview session recreation on LUT state change
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user