Skip to content

Commit

Permalink
hwc_display: Support Dolby Vision
Browse files Browse the repository at this point in the history
Change-Id: Ia73b7674d396de434272aeedf28245e417a1e5bb
  • Loading branch information
ArianK16a authored and 33bca committed Aug 22, 2023
1 parent 1774ed9 commit a1411d2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions composer/hwc_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1774,22 +1774,18 @@ HWC2::Error HWCDisplay::GetHdrCapabilities(uint32_t *out_num_types, int32_t *out

uint32_t num_types = 0;
if (fixed_info.hdr_plus_supported) {
num_types = UINT32(Hdr::HDR10_PLUS) - 1;
num_types = UINT32(Hdr::HDR10_PLUS);
} else {
num_types = UINT32(Hdr::HLG) - 1;
num_types = UINT32(Hdr::HLG);
}

// We support HDR10, HLG and HDR10_PLUS.
// We support DOLBY_VISION, HDR10, HLG and HDR10_PLUS.
if (out_types == nullptr) {
*out_num_types = num_types;
} else {
uint32_t max_out_types = std::min(*out_num_types, num_types);
int32_t type = static_cast<int32_t>(Hdr::DOLBY_VISION);
for (int32_t i = 0; i < max_out_types; i++) {
while (type == static_cast<int32_t>(Hdr::DOLBY_VISION) /* Skip list */) {
// Skip the type
type++;
}
if (type > (num_types + 1)) {
break;
}
Expand Down

0 comments on commit a1411d2

Please sign in to comment.