[idd] postprocess: centralize color transform state

This commit is contained in:
Geoffrey McRae
2026-08-13 20:44:31 +10:00
parent 3d7df86a01
commit 84bda112ac
6 changed files with 63 additions and 58 deletions

View File

@@ -241,13 +241,14 @@ NTSTATUS LGIddMonitorSetGammaRamp(IDDCX_MONITOR monitor, const IDARG_IN_SET_GAMM
transform->lut[i][3] = 1.0f;
}
if (IsIdentityColorTransform(*transform))
auto active = D12::Transform(transform);
if (!active)
{
control.SetColorTransform(nullptr);
return STATUS_SUCCESS;
}
control.SetColorTransform(std::move(transform));
control.SetColorTransform(std::move(active));
DEBUG_INFO("Display color transform updated (matrix:%d lut:%d)",
input->MatrixEnabled, input->LutEnabled);
return STATUS_SUCCESS;