hwc2: Add HLG cap in the HDR capabilities

Add HAL_HDR_HLG in the HDR Capabilities of HWC device implementation.

CRs-Fixed: 2209117
Change-Id: I64ea9c5f4dfe3f1eb8176906016242acbb2251e8
This commit is contained in:
Sushil Chauhan
2018-03-19 11:19:27 -07:00
committed by Gerrit - the friendly Code Review server
parent 3bd713bd6d
commit 970e351c76

View File

@@ -1232,11 +1232,12 @@ HWC2::Error HWCDisplay::GetHdrCapabilities(uint32_t *out_num_types, int32_t *out
}
if (out_types == nullptr) {
// 1(now) - because we support only HDR10, change when HLG & DOLBY vision are supported
*out_num_types = 1;
// We support HDR10 and HLG
*out_num_types = 2;
} else {
// Only HDR10 supported
*out_types = HAL_HDR_HDR10;
// HDR10 and HLG are supported
out_types[0] = HAL_HDR_HDR10;
out_types[1] = HAL_HDR_HLG;
static const float kLuminanceFactor = 10000.0;
// luminance is expressed in the unit of 0.0001 cd/m2, convert it to 1cd/m2.
*out_max_luminance = FLOAT(fixed_info.max_luminance)/kLuminanceFactor;