Support RenderIntents in libtonemap.
Add RenderIntent as a supported uniform which is needed as some devices
may perform contrast enhancements intended for SDR content which must be
compensated for pre-blend for HDR content.
Bug: 227779465
Test: builds
Change-Id: Id74277e727d73cb9e371c37a83bef805e66271f4
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index e99b70f..004e071 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -1177,6 +1177,9 @@
clientCompositionDisplay.targetLuminanceNits =
outputState.clientTargetBrightness * outputState.displayBrightnessNits;
clientCompositionDisplay.dimmingStage = outputState.clientTargetDimmingStage;
+ clientCompositionDisplay.renderIntent =
+ static_cast<aidl::android::hardware::graphics::composer3::RenderIntent>(
+ outputState.renderIntent);
// Compute the global color transform matrix.
clientCompositionDisplay.colorTransform = outputState.colorTransformMatrix;