[ConfigStore] Add getCompositionPreference.
In order to tell renderer to render into the best color space with the right
pixel format. We need to expose it as a composition preference. This patch adds
ConfigStore API to query such preference.
Typically, this API will return the default data space of a color space that
the panel is calibrated to, with the default pixel format that hardware
composer can composite to efficiently. However, devices can make tradeoff
between data space and pixel format.
BUG: 113530681
Test: Build, flash, boot
Change-Id: I0ea09e21e70843b50157ec617c87a42bb4ff7332
diff --git a/configstore/1.2/default/surfaceflinger.mk b/configstore/1.2/default/surfaceflinger.mk
index 70be450..f323999 100644
--- a/configstore/1.2/default/surfaceflinger.mk
+++ b/configstore/1.2/default/surfaceflinger.mk
@@ -58,3 +58,11 @@
ifeq ($(TARGET_USE_COLOR_MANAGEMENT),true)
LOCAL_CFLAGS += -DUSE_COLOR_MANAGEMENT
endif
+
+ifneq ($(SF_COMPOSITION_DATA_SPACE),)
+ LOCAL_CFLAGS += -DCOMPOSITION_DATA_SPACE=$(SF_COMPOSITION_DATA_SPACE)
+endif
+
+ifneq ($(SF_COMPOSITION_PIXEL_FORMAT),)
+ LOCAL_CFLAGS += -DCOMPOSITION_PIXEL_FORMAT=$(SF_COMPOSITION_PIXEL_FORMAT)
+endif