summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_layers.cpp
diff options
context:
space:
mode:
authorYichi Chen <yichichen@google.com>2018-11-08 07:25:47 +0800
committerYichi Chen <yichichen@google.com>2018-11-09 01:40:05 +0800
commitc8c02b38ef9cdc2d277a6838a14a326b7a179223 (patch)
tree0c58068e2b3846a205088f86d2173f072255b7a8 /sdm/libs/hwc2/hwc_layers.cpp
parent766d1fa40c37eaaa6afbaaa14cb3e2be56253745 (diff)
downloaddisplay-c8c02b38ef9cdc2d277a6838a14a326b7a179223.tar.gz
hwc: Enable local conversion from BT2020 to DCI-P3 for video
As the support of BT2020 in SF, it is mapped to DCI-P3 for better color space mapping. To ensure video content in BT2020 be composed by HWC, enable the local conversion to support this case. Bug: 118870669 Test: UHD secure video in Dataspace::BT2020 can be played with HWC UHD non-secure video in Dataspace::BT2020 is played with HWC Change-Id: I2a0879198f460be77530aefd2cdbea89e8a4de0b
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r--sdm/libs/hwc2/hwc_layers.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp
index d0a23abf..8e96a7e1 100644
--- a/sdm/libs/hwc2/hwc_layers.cpp
+++ b/sdm/libs/hwc2/hwc_layers.cpp
@@ -889,12 +889,16 @@ bool HWCLayer::SupportLocalConversion(ColorPrimaries working_primaries) {
return true;
}
- if (working_primaries == ColorPrimaries_BT709_5 && layer_->input_buffer.flags.video &&
+ if ((working_primaries == ColorPrimaries_BT709_5 || working_primaries == ColorPrimaries_DCIP3) &&
+ layer_->input_buffer.flags.video &&
IsBT2020(layer_->input_buffer.color_metadata.colorPrimaries) &&
layer_->input_buffer.color_metadata.transfer == Transfer_SMPTE_170M) {
return true;
}
+ if (layer_->input_buffer.flags.secure)
+ return true;
+
return false;
}