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/ComposerHal.h b/services/surfaceflinger/DisplayHardware/ComposerHal.h
index 5cc5a12..6e4d23b 100644
--- a/services/surfaceflinger/DisplayHardware/ComposerHal.h
+++ b/services/surfaceflinger/DisplayHardware/ComposerHal.h
@@ -261,7 +261,7 @@
float* outWhitePointNits) = 0;
// AIDL Composer
- virtual Error setLayerWhitePointNits(Display display, Layer layer, float whitePointNits) = 0;
+ virtual Error setLayerBrightness(Display display, Layer layer, float brightness) = 0;
virtual Error setLayerBlockingRegion(Display display, Layer layer,
const std::vector<IComposerClient::Rect>& blocking) = 0;
virtual Error setBootDisplayConfig(Display displayId, Config) = 0;