diff options
author | Naseer Ahmed <naseer@codeaurora.org> | 2018-05-24 17:27:05 -0400 |
---|---|---|
committer | Naseer Ahmed <naseer@codeaurora.org> | 2018-05-24 17:47:08 -0400 |
commit | 7c6cae4de1d50cbada387041072ca31a42ca32b3 (patch) | |
tree | 8f978ef99da3e00c0b87848218b2f93bc26140ab /sdm | |
parent | 74bfd05b0bee6f0dbd951dd3dc731343bc745170 (diff) | |
download | android_hardware_qcom_sdm710_display-7c6cae4de1d50cbada387041072ca31a42ca32b3.tar.gz android_hardware_qcom_sdm710_display-7c6cae4de1d50cbada387041072ca31a42ca32b3.tar.bz2 android_hardware_qcom_sdm710_display-7c6cae4de1d50cbada387041072ca31a42ca32b3.zip |
hwc: Do not reapply mode if already set
Change-Id: Ica6ad6941dc04a190b0088581a2d6293c2024202
CRs-Fixed: 2248553
Diffstat (limited to 'sdm')
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 091c54a3..8a337a09 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -111,6 +111,10 @@ HWC2::Error HWCColorMode::SetColorModeWithRenderIntent(ColorMode mode, RenderInt return HWC2::Error::Unsupported; } + if (current_color_mode_ == mode && current_render_intent_ == intent) { + return HWC2::Error::None; + } + auto mode_string = color_mode_map_[mode][intent]; DisplayError error = display_intf_->SetColorMode(mode_string); if (error != kErrorNone) { |