diff options
author | Qing Huang <huangq@codeaurora.org> | 2019-04-26 16:14:23 +0800 |
---|---|---|
committer | Qing Huang <huangq@codeaurora.org> | 2019-05-06 17:08:35 +0800 |
commit | 36bad9add6fd43590fa21e8ffcee11cbb99d84ce (patch) | |
tree | 212cfe11d20c96fb6772789eb3f9afeee6729e6f /sdm/libs/hwc2/hwc_display.cpp | |
parent | 60c680f81b3d277e15fab7faa7ae14df82254289 (diff) |
display: Enumerate user color modes
Enumerate user color modes and report to SF during
the initialization, user modes may not be read if
partation are encrypted during the boot up.
Change fixes the issue of set color mode failed
from QDCM mobile APK.
Change-Id: Ia582cac53936348c79e3612416bb240444bc4ca5
Diffstat (limited to 'sdm/libs/hwc2/hwc_display.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 8a8415b7..94c0bbbf 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -407,40 +407,6 @@ void HWCColorMode::PopulateColorModes() { } } -HWC2::Error HWCColorMode::ApplyDefaultColorMode() { - auto color_mode = ColorMode::NATIVE; - if (color_mode_map_.size() == 1U) { - color_mode = color_mode_map_.begin()->first; - } else if (color_mode_map_.size() > 1U) { - std::string default_color_mode; - bool found = false; - DisplayError error = display_intf_->GetDefaultColorMode(&default_color_mode); - if (error == kErrorNone) { - // get the default mode corresponding android_color_mode_t - for (auto &it_mode : color_mode_map_) { - for (auto &it : it_mode.second) { - for (auto &it_range : it.second) { - if (it_range.second == default_color_mode) { - found = true; - break; - } - } - } - if (found) { - color_mode = it_mode.first; - break; - } - } - } - - // return the first color mode we encounter if not found - if (!found) { - color_mode = color_mode_map_.begin()->first; - } - } - return SetColorModeWithRenderIntent(color_mode, RenderIntent::COLORIMETRIC); -} - void HWCColorMode::Dump(std::ostringstream* os) { *os << "color modes supported: \n"; for (auto it : color_mode_map_) { |