diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-16 07:21:24 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-16 07:21:24 +0000 |
commit | 26828b3c319af3caf16a9ef523c04dd4de0c6832 (patch) | |
tree | ed7aeed10ffb568ed9e33fb5a5f30c6e527ad2d8 | |
parent | f9878ad3551257d23d2e4107897e869ed939b68e (diff) | |
parent | 2924d01304dba0b714c556b14e45e34f70472e96 (diff) | |
download | native-oreo-dr2-release.tar.gz |
release-request-447544c9-42cd-4c45-a7c6-4f09361c94db-for-git_oc-dr1-release-4277755 snap-temp-L90500000093605838android-8.0.0_r27android-8.0.0_r26android-8.0.0_r25android-8.0.0_r24android-8.0.0_r23android-8.0.0_r22android-8.0.0_r21oreo-dr2-release
Change-Id: I47179ab7a6c8c075e9ba510e5e97de83f00e8f4a
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 2703db8e93..8ed6686ebf 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -377,20 +377,10 @@ void SurfaceFlinger::bootFinished() LOG_EVENT_LONG(LOGTAG_SF_STOP_BOOTANIM, ns2ms(systemTime(SYSTEM_TIME_MONOTONIC))); - sp<LambdaMessage> bootFinished = new LambdaMessage([&]() { - mBootFinished = true; - + sp<LambdaMessage> readProperties = new LambdaMessage([&]() { readPersistentProperties(); - -#ifdef USE_HWC2 - sp<DisplayDevice> hw(getDisplayDevice(mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY])); - if (hw->getWideColorSupport()) { - hw->setCompositionDataSpace(HAL_DATASPACE_V0_SRGB); - setActiveColorModeInternal(hw, HAL_COLOR_MODE_SRGB); - } -#endif }); - postMessageAsync(bootFinished); + postMessageAsync(readProperties); } void SurfaceFlinger::deleteTextureAsync(uint32_t texture) { @@ -555,7 +545,7 @@ void SurfaceFlinger::init() { ALOGI( "SurfaceFlinger's main thread ready to run. " "Initializing graphics H/W..."); - ALOGI("Phase offset NS: %" PRId64 "", vsyncPhaseOffsetNs); + ALOGI("Phase offest NS: %" PRId64 "", vsyncPhaseOffsetNs); { // Autolock scope Mutex::Autolock _l(mStateLock); @@ -1224,7 +1214,11 @@ void SurfaceFlinger::createDefaultDisplayDevice() { token, fbs, producer, mRenderEngine->getEGLConfig(), hasWideColorModes && hasWideColorDisplay); mDisplays.add(token, hw); - setActiveColorModeInternal(hw, HAL_COLOR_MODE_NATIVE); + android_color_mode defaultColorMode = HAL_COLOR_MODE_NATIVE; + if (hasWideColorModes && hasWideColorDisplay) { + defaultColorMode = HAL_COLOR_MODE_SRGB; + } + setActiveColorModeInternal(hw, defaultColorMode); hw->setCompositionDataSpace(HAL_DATASPACE_UNKNOWN); } @@ -1870,12 +1864,7 @@ void SurfaceFlinger::setUpHWComposer() { } newColorMode = pickColorMode(newDataSpace); - // We want the color mode of the boot animation to match that of the bootloader - // To achieve this we suppress color mode changes until after the boot animation - if (mBootFinished) { - setActiveColorModeInternal(displayDevice, newColorMode); - displayDevice->setCompositionDataSpace(newDataSpace); - } + setActiveColorModeInternal(displayDevice, newColorMode); } } |