[RenderEngine] Fix transfer function bug.
Previously we failed to set the input and output transfer function when there's
no color space transformation or no color matrix, this patch fixes it.
BUG: 120445231
Test: Build, flash and boot. Verify with demo app.
Change-Id: I853b6b9944a05e6360dfdfca493351f755b500ba
diff --git a/libs/renderengine/gl/ProgramCache.cpp b/libs/renderengine/gl/ProgramCache.cpp
index bf2354d..49bdd2a 100644
--- a/libs/renderengine/gl/ProgramCache.cpp
+++ b/libs/renderengine/gl/ProgramCache.cpp
@@ -151,7 +151,8 @@
needs.set(Key::Y410_BT2020_MASK,
description.isY410BT2020 ? Key::Y410_BT2020_ON : Key::Y410_BT2020_OFF);
- if (needs.hasTransformMatrix() || (needs.getInputTF() != needs.getOutputTF())) {
+ if (needs.hasTransformMatrix() ||
+ (description.inputTransferFunction != description.outputTransferFunction)) {
switch (description.inputTransferFunction) {
case Description::TransferFunction::LINEAR:
default: