From 6333af55705231910e7a2179bc727204ad5e90de Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 16 Oct 2018 13:46:36 -0700 Subject: 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 --- services/surfaceflinger/DisplayDevice.cpp | 9 ++++++--- 1 file 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(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(dataspace)).c_str(), + decodeRenderIntent(intent).c_str()); + } *outDataspace = Dataspace::UNKNOWN; *outMode = ColorMode::NATIVE; -- cgit v1.2.3-59-g8ed1b