surfaceflinger: Set correct initial value for mActiveColorMode
HWC always initializes with the native mode, setting
mActiveColorMode to sRGB here without actually calling
setColorMode on HWC will cause framework to think that it is in
sRGB mode already, when the mode has not been set yet.
Bug: 38207860
Test: Compile and boot
Change-Id: I492c07ce542f5a448ff4c7d2f18e72629fc6cd78
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 4d0c085..a0abf12 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -121,8 +121,7 @@
ANativeWindow* const window = mNativeWindow.get();
#ifdef USE_HWC2
- // Set defaultColorMode to SRGB if this device supports wide-color
- mActiveColorMode = (supportWideColor) ? HAL_COLOR_MODE_SRGB : HAL_COLOR_MODE_NATIVE;
+ mActiveColorMode = HAL_COLOR_MODE_NATIVE;
mDisplayHasWideColor = supportWideColor;
#else
(void) supportWideColor;