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/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h
index b183924..a37b8dd 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2.h
@@ -320,7 +320,7 @@
const std::string& name, bool mandatory, const std::vector<uint8_t>& value) = 0;
// AIDL HAL
- [[clang::warn_unused_result]] virtual hal::Error setWhitePointNits(float whitePointNits) = 0;
+ [[clang::warn_unused_result]] virtual hal::Error setBrightness(float brightness) = 0;
[[clang::warn_unused_result]] virtual hal::Error setBlockingRegion(
const android::Region& region) = 0;
};
@@ -369,7 +369,7 @@
const std::vector<uint8_t>& value) override;
// AIDL HAL
- hal::Error setWhitePointNits(float whitePointNits) override;
+ hal::Error setBrightness(float brightness) override;
hal::Error setBlockingRegion(const android::Region& region) override;
private: