Snap for 4393550 from e234d57654 to pi-release

Change-Id: I00fc61f883a1375c0406d8e372102909e2514365
This commit is contained in:
android-build-team Robot 2017-10-13 08:13:47 +00:00
commit 76dd22a44b
1 changed files with 2 additions and 3 deletions

View File

@ -135,7 +135,7 @@ 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) {
color_mode_transform = color_mode_transform_map_[mode][transform_hint];
DisplayError error = display_intf_->SetColorMode(color_mode_transform);
if (error != kErrorNone) {
@ -143,6 +143,7 @@ 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);
}
if (use_matrix) {
@ -157,8 +158,6 @@ 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;
}