diff options
author | Naseer Ahmed <naseer@codeaurora.org> | 2018-07-30 16:09:35 -0400 |
---|---|---|
committer | Yichi Chen <yichichen@google.com> | 2018-07-31 11:02:35 +0800 |
commit | debc6e314537274ccae0c29a3dde450f6444e313 (patch) | |
tree | 48781ba0e09fc4905ca61fbe51ecfdaa894a4651 /sdm | |
parent | babd90bb1a49c7bb649448876389fb04eb8256c3 (diff) | |
download | display-debc6e314537274ccae0c29a3dde450f6444e313.tar.gz |
hwc: Fix local conversion issue
* When the input layer is a video, 2020 layers can be converted to
sRGB
* Restrict this change to secure videos only
Bug: 111881338
Test: UHD secure video in Dataspace::BT2020 can be played with HWC
UHD non-secure video in Dataspace::BT2020 is played with GL
Change-Id: I17d13eda3a3915ed188326aa88073dc6e8fa896b
Diffstat (limited to 'sdm')
-rw-r--r-- | sdm/libs/hwc2/hwc_layers.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp index 028a3bca..e16d0733 100644 --- a/sdm/libs/hwc2/hwc_layers.cpp +++ b/sdm/libs/hwc2/hwc_layers.cpp @@ -869,6 +869,14 @@ bool HWCLayer::SupportLocalConversion(ColorPrimaries working_primaries) { working_primaries <= ColorPrimaries_BT601_6_525) { return true; } + + if (working_primaries == ColorPrimaries_BT709_5 && + layer_->input_buffer.flags.video && + layer_->input_buffer.flags.secure && + layer_->input_buffer.color_metadata.transfer == Transfer_SMPTE_170M ) { + return true; + } + return false; } |