OSDN Git Service

surfaceflinger: Set correct initial value for mActiveColorMode
authorNaseer Ahmed <naseer@codeaurora.org>
Thu, 11 May 2017 15:15:21 +0000 (11:15 -0400)
committerRomain Guy <romainguy@google.com>
Thu, 11 May 2017 16:59:43 +0000 (09:59 -0700)
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

services/surfaceflinger/DisplayDevice.cpp

index 4d0c085..a0abf12 100644 (file)
@@ -121,8 +121,7 @@ DisplayDevice::DisplayDevice(
     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;