OSDN Git Service

Add Board Config option to disable Native Color Mode support.
authorRagha Khandenahally <Ragha.Khandenahally@intel.com>
Sun, 22 Jan 2017 02:04:45 +0000 (18:04 -0800)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Sun, 22 Jan 2017 04:47:45 +0000 (20:47 -0800)
Android Things frameworks still doesnt have support for this.
This patch adds support to disable this in HWC via Build Config
option.

Jira: None.
Test: Build passes.

Signed-off-by: Ragha Khandenahally <Ragha.Khandenahally@intel.com>
Android.mk
os/android/drmhwctwo.cpp

index d06e952..d93d0af 100644 (file)
@@ -79,6 +79,10 @@ ifeq ($(strip $(BOARD_DISABLE_OVERLAY_USAGE)),true)
 LOCAL_CPPFLAGS += -DDISABLE_OVERLAY_USAGE
 endif
 
+ifeq ($(strip $(BOARD_DISABLE_NATIVE_COLOR_MODES)),true)
+LOCAL_CPPFLAGS += -DDISABLE_NATIVE_COLOR_MODES
+endif
+
 ifeq ($(strip $(BOARD_DISABLE_EXPLICIT_SYNC)),true)
 LOCAL_CPPFLAGS += -DDISABLE_EXPLICIT_SYNC
 endif
index 0e02d05..a583951 100644 (file)
@@ -260,9 +260,10 @@ HWC2::Error DrmHwcTwo::HwcDisplay::GetColorModes(uint32_t *num_modes,
   supported(__func__);
   if (!modes)
     *num_modes = 1;
-
+#ifndef DISABLE_NATIVE_COLOR_MODES
   if (modes)
     *modes = HAL_COLOR_MODE_NATIVE;
+#endif
 
   return HWC2::Error::None;
 }