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
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 87fd2f1..c8025b3 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2739,7 +2739,7 @@
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 @@
}
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;
}