Add queries for surface color space support

Add two queries to query if the current surface can support
wide-color (Display-P3) or HDR.
Test: TBD CTS test

Change-Id: I2c68b0e1b1e0c2a0257e0c93f60cb8d84de20b4a
diff --git a/include/system/window.h b/include/system/window.h
index c340773..8149ca5 100644
--- a/include/system/window.h
+++ b/include/system/window.h
@@ -330,6 +330,7 @@
  * ANativeWindow.
  */
 enum {
+// clang-format off
     NATIVE_WINDOW_SET_USAGE                 =  0,
     NATIVE_WINDOW_CONNECT                   =  1,   /* deprecated */
     NATIVE_WINDOW_DISCONNECT                =  2,   /* deprecated */
@@ -358,6 +359,9 @@
     NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS   = 25,
     NATIVE_WINDOW_GET_COMPOSITOR_TIMING     = 26,
     NATIVE_WINDOW_GET_FRAME_TIMESTAMPS      = 27,
+    NATIVE_WINDOW_GET_WIDE_COLOR_SUPPORT    = 28,
+    NATIVE_WINDOW_GET_HDR_SUPPORT           = 29,
+// clang-format on
 };
 
 /* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */
@@ -1065,6 +1069,16 @@
             outDisplayRetireTime, outDequeueReadyTime, outReleaseTime);
 }
 
+static inline int native_window_get_wide_color_support(
+    struct ANativeWindow* window, bool* outSupport) {
+  return window->perform(window, NATIVE_WINDOW_GET_WIDE_COLOR_SUPPORT,
+                         outSupport);
+}
+
+static inline int native_window_get_hdr_support(struct ANativeWindow* window,
+                                                bool* outSupport) {
+  return window->perform(window, NATIVE_WINDOW_GET_HDR_SUPPORT, outSupport);
+}
 
 __END_DECLS