Support fp16 in sf
* Make sure we don't dim SDR in renderengine, and instead map HDR to the
correct relative luminance above 1.0
* Plumb the HDR/SDR ratio into HWC
Bug: 236745178
Test: builds
Change-Id: I325972a01280d287189d38dd6c5bf7f2d4b776bb
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.cpp b/services/surfaceflinger/DisplayHardware/HWC2.cpp
index bc763b2..24a9e22 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWC2.cpp
@@ -446,12 +446,13 @@
}
Error Display::setClientTarget(uint32_t slot, const sp<GraphicBuffer>& target,
- const sp<Fence>& acquireFence, Dataspace dataspace)
-{
+ const sp<Fence>& acquireFence, Dataspace dataspace,
+ float hdrSdrRatio) {
// TODO: Properly encode client target surface damage
int32_t fenceFd = acquireFence->dup();
- auto intError = mComposer.setClientTarget(mId, slot, target,
- fenceFd, dataspace, std::vector<Hwc2::IComposerClient::Rect>());
+ auto intError =
+ mComposer.setClientTarget(mId, slot, target, fenceFd, dataspace,
+ std::vector<Hwc2::IComposerClient::Rect>(), hdrSdrRatio);
return static_cast<Error>(intError);
}