summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/DisplayDevice.cpp
diff options
context:
space:
mode:
author Chia-I Wu <olv@google.com> 2018-10-16 13:46:36 -0700
committer Chia-I Wu <olv@google.com> 2018-10-16 13:48:58 -0700
commit6333af55705231910e7a2179bc727204ad5e90de (patch)
tree81fb7a791109a4176b9755750eb93dbe9b3e3e4a /services/surfaceflinger/DisplayDevice.cpp
parentc7e86caf44cf8eab04c891346b5c4ff194fe230d (diff)
surfaceflinger: silence an error for non-WCG displays
This happens when a non-WCG display is plugged in to a color managed device. Bug: 117814643 Test: manual Change-Id: I30930903f8dd897ff7ff4e1e4c5ff46f9d438b5b
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index db095a51d9..309fd0a791 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -781,9 +781,12 @@ void DisplayDevice::getBestColorMode(Dataspace dataspace, RenderIntent intent,
*outMode = iter->second.colorMode;
*outIntent = iter->second.renderIntent;
} else {
- ALOGE("map unknown (%s)/(%s) to default color mode",
- dataspaceDetails(static_cast<android_dataspace_t>(dataspace)).c_str(),
- decodeRenderIntent(intent).c_str());
+ // this is unexpected on a WCG display
+ if (hasWideColorGamut()) {
+ ALOGE("map unknown (%s)/(%s) to default color mode",
+ dataspaceDetails(static_cast<android_dataspace_t>(dataspace)).c_str(),
+ decodeRenderIntent(intent).c_str());
+ }
*outDataspace = Dataspace::UNKNOWN;
*outMode = ColorMode::NATIVE;