summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_layers.cpp
diff options
context:
space:
mode:
authorArun Kumar K.R <akumarkr@codeaurora.org>2018-12-07 08:00:15 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2019-01-02 02:05:01 -0800
commit5b82155e29fc5f681d8c2961134df84d1a9ab3c3 (patch)
treed86a9e782b5363d2c9cf1482801f453f9631e325 /sdm/libs/hwc2/hwc_layers.cpp
parent3ff552189ec32878858a65c46387bf1063083ff9 (diff)
hwc2: Derive dataspace on ClientTarget from ColorMode
- The dataspace of the client target depends on the current color mode. Clients calls SetClientTarget after prepare, SDM needs dataspace information in the Validate phase to set up its pipeline. Hence derive the client target dataspace based on the current color mode. - Return error if dataspace doesn't match in SetClientTarget Change-Id: I6edccf44e73c57a16e97b3c7e6d121dbc8775627 Crs-fixed: 2364498
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r--sdm/libs/hwc2/hwc_layers.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp
index 45cfb16c..4caad2a7 100644
--- a/sdm/libs/hwc2/hwc_layers.cpp
+++ b/sdm/libs/hwc2/hwc_layers.cpp
@@ -182,6 +182,10 @@ int32_t TranslateFromLegacyDataspace(const int32_t &legacy_ds) {
}
}
+ if (dataspace == HAL_DATASPACE_UNKNOWN) {
+ dataspace = HAL_DATASPACE_V0_SRGB;
+ }
+
return dataspace;
}