diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-27 07:26:23 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-27 07:26:23 +0000 |
| commit | 4fb1ecd92358d7ad34cd2f1a60058b04e257e4f0 (patch) | |
| tree | b1257828f63c55e17481853c036d96e92f0c7f90 | |
| parent | d41b688be0a716965692e767849be828680fc830 (diff) | |
| parent | 029637199175c85b6c75ffd63d145efe0f202974 (diff) | |
| download | platform_hardware_qcom_display-security-pi-release.tar.gz platform_hardware_qcom_display-security-pi-release.tar.bz2 platform_hardware_qcom_display-security-pi-release.zip | |
Snap for 4807121 from 029637199175c85b6c75ffd63d145efe0f202974 to pi-releaseandroid-vts-9.0_r4android-security-9.0.0_r72android-security-9.0.0_r71android-security-9.0.0_r70android-security-9.0.0_r69android-security-9.0.0_r68android-security-9.0.0_r67android-security-9.0.0_r66android-security-9.0.0_r65android-security-9.0.0_r64android-security-9.0.0_r63android-security-9.0.0_r62android-cts-9.0_r2android-cts-9.0_r1android-9.0.0_r61android-9.0.0_r60android-9.0.0_r59android-9.0.0_r58android-9.0.0_r57android-9.0.0_r56android-9.0.0_r55android-9.0.0_r54android-9.0.0_r53android-9.0.0_r52android-9.0.0_r51android-9.0.0_r50android-9.0.0_r49android-9.0.0_r48android-9.0.0_r3android-9.0.0_r2android-9.0.0_r1security-pi-releasepie-security-release
Change-Id: I76f343253581eadb11aeea9a37228358e98be8bf
| -rw-r--r-- | msm8996/sdm/libs/hwc2/hwc_display.cpp | 9 | ||||
| -rw-r--r-- | msm8996/sdm/libs/hwc2/hwc_display.h | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/msm8996/sdm/libs/hwc2/hwc_display.cpp b/msm8996/sdm/libs/hwc2/hwc_display.cpp index 507eff5e..97652d16 100644 --- a/msm8996/sdm/libs/hwc2/hwc_display.cpp +++ b/msm8996/sdm/libs/hwc2/hwc_display.cpp @@ -135,7 +135,8 @@ HWC2::Error HWCColorMode::HandleColorModeTransform(android_color_mode_t mode, // if the mode count is 1, then only native mode is supported, so just apply matrix w/o // setting mode - if (color_mode_transform_map_.size() > 1U) { + if ((color_mode_transform_map_.size() > 1U && current_color_mode_ != mode) || + (current_color_transform_ != hint)) { color_mode_transform = color_mode_transform_map_[mode][transform_hint]; DisplayError error = display_intf_->SetColorMode(color_mode_transform); if (error != kErrorNone) { @@ -143,7 +144,10 @@ HWC2::Error HWCColorMode::HandleColorModeTransform(android_color_mode_t mode, // failure to force client composition return HWC2::Error::Unsupported; } + DLOGI("Setting Color Mode = %d Transform Hint = %d Success", mode, hint); } + current_color_mode_ = mode; + current_color_transform_ = hint; if (use_matrix) { DisplayError error = display_intf_->SetColorTransform(kColorTransformMatrixCount, matrix); @@ -154,10 +158,7 @@ HWC2::Error HWCColorMode::HandleColorModeTransform(android_color_mode_t mode, } } - current_color_mode_ = mode; - current_color_transform_ = hint; CopyColorTransformMatrix(matrix, color_matrix_); - DLOGV_IF(kTagQDCM, "Setting Color Mode = %d Transform Hint = %d Success", mode, hint); return HWC2::Error::None; } diff --git a/msm8996/sdm/libs/hwc2/hwc_display.h b/msm8996/sdm/libs/hwc2/hwc_display.h index 9343209b..b8fef4fe 100644 --- a/msm8996/sdm/libs/hwc2/hwc_display.h +++ b/msm8996/sdm/libs/hwc2/hwc_display.h @@ -79,7 +79,10 @@ class HWCColorMode { android_color_transform_t current_color_transform_ = HAL_COLOR_TRANSFORM_IDENTITY; typedef std::map<android_color_transform_t, std::string> TransformMap; std::map<android_color_mode_t, TransformMap> color_mode_transform_map_ = {}; - double color_matrix_[kColorTransformMatrixCount] = {0}; + double color_matrix_[kColorTransformMatrixCount] = { 1.0, 0.0, 0.0, 0.0, \ + 0.0, 1.0, 0.0, 0.0, \ + 0.0, 0.0, 1.0, 0.0, \ + 0.0, 0.0, 0.0, 1.0 }; }; class HWCDisplay : public DisplayEventHandler { |
