Plumb through dimming stage into RenderEngine.
If HWC is requesting that dimming happens after OETF is applied, then
apply the dimming matrix as part of the display color transform
Bug: 218954037
Test: Toggle client composition in adaptive color mode during HDR
playback
Change-Id: Ib72f3f4b6dfcced02fc330e64fa72546a18fb608
Merged-In: Ib72f3f4b6dfcced02fc330e64fa72546a18fb608
diff --git a/libs/renderengine/include/renderengine/DisplaySettings.h b/libs/renderengine/include/renderengine/DisplaySettings.h
index 40ba5ad..bf50644 100644
--- a/libs/renderengine/include/renderengine/DisplaySettings.h
+++ b/libs/renderengine/include/renderengine/DisplaySettings.h
@@ -16,6 +16,7 @@
#pragma once
+#include <aidl/android/hardware/graphics/composer3/DimmingStage.h>
#include <iosfwd>
#include <math/mat4.h>
@@ -68,6 +69,10 @@
// All layers will be dimmed by (max(layer white points) / targetLuminanceNits).
// If the target luminance is unknown, then no display-level dimming occurs.
float targetLuminanceNits = -1.f;
+
+ // Configures when dimming should be applied for each layer.
+ aidl::android::hardware::graphics::composer3::DimmingStage dimmingStage =
+ aidl::android::hardware::graphics::composer3::DimmingStage::NONE;
};
static inline bool operator==(const DisplaySettings& lhs, const DisplaySettings& rhs) {