Send dimming ratio to composer instead of white point nits
* Send the dimming ratio over to composer as the HWC api is changing to
not expose the notion of nits to composer, as the white point nits are
part of logical SF state that does not map as nicely to display
hardware
* Fixes an issue where scheduling a recomposite for a frame when
brightness changes is contingent on the presence of HDR layers, which
is not valid when an HDR layer exits the scene, but DisplayManager
animates the display brightness down to the SDR white point.
Bug: 217961164
Test: builds, boots
Test: HDR test videos on youtube
Change-Id: Icc07b00f60859bbd3ee078cd2bb793eda42e7781
diff --git a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
index d10468a..4e8d8c4 100644
--- a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
@@ -1062,9 +1062,8 @@
return Error::NONE;
}
-Error AidlComposer::setLayerWhitePointNits(Display display, Layer layer, float whitePointNits) {
- mWriter.setLayerWhitePointNits(translate<int64_t>(display), translate<int64_t>(layer),
- whitePointNits);
+Error AidlComposer::setLayerBrightness(Display display, Layer layer, float brightness) {
+ mWriter.setLayerBrightness(translate<int64_t>(display), translate<int64_t>(layer), brightness);
return Error::NONE;
}