diff options
| author | 2018-02-20 14:27:30 -0800 | |
|---|---|---|
| committer | 2018-02-28 08:47:09 -0800 | |
| commit | 9a48a8c84bf84dff2aaf51a011b5810d89dddc32 (patch) | |
| tree | 7e535761acd026d8adb145ae5340e75331c0db7c /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 69bf10f5ea9b8abce49d49235630388dd57d3e62 (diff) | |
surfaceflinger: simplify getActiveColorMode check
When mForceNativeColorMode is true, getActiveColorMode returns
HAL_COLOR_MODE_NATIVE. There is no need to check both.
Test: manual with UiBench
Change-Id: I3bbf66d85ccb262441b9d216096ec869c529b7e8
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 87fd2f1e72..c8025b37c5 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2739,7 +2739,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& displayDev ALOGV("hasClientComposition"); android_dataspace outputDataspace = HAL_DATASPACE_UNKNOWN; - if (!mForceNativeColorMode && displayDevice->getWideColorSupport() && + if (displayDevice->getWideColorSupport() && displayDevice->getActiveColorMode() == HAL_COLOR_MODE_DISPLAY_P3) { outputDataspace = HAL_DATASPACE_DISPLAY_P3; } @@ -4600,7 +4600,7 @@ void SurfaceFlinger::renderScreenImplLocked(const RenderArea& renderArea, } android_dataspace outputDataspace = HAL_DATASPACE_UNKNOWN; - if (!mForceNativeColorMode && renderArea.getWideColorSupport() && + if (renderArea.getWideColorSupport() && renderArea.getActiveColorMode() == HAL_COLOR_MODE_DISPLAY_P3) { outputDataspace = HAL_DATASPACE_DISPLAY_P3; } |