[ADisplay] Expose preferred WCG format per-display
This mirrors the api exposed by the SDK.
Similarly to the other ADisplay apis, the intention is that these apis
will be #apex stable, but the map file doesn't need to be updated until
HWUI is shipping in an updatable module.
Bug: 144505134
Test: builds
Change-Id: I2a06e4c304edb28d4580ef0aef4431ec8df2d94e
diff --git a/libs/nativedisplay/include/apex/display.h b/libs/nativedisplay/include/apex/display.h
index 7af452a..9be401e 100644
--- a/libs/nativedisplay/include/apex/display.h
+++ b/libs/nativedisplay/include/apex/display.h
@@ -16,6 +16,8 @@
#pragma once
+#include <android/data_space.h>
+#include <android/hardware_buffer.h>
#include <inttypes.h>
__BEGIN_DECLS
@@ -72,6 +74,12 @@
ADisplayType ADisplay_getDisplayType(ADisplay* display);
/**
+ * Queries the display's preferred WCG format
+ */
+void ADisplay_getPreferredWideColorFormat(ADisplay* display, ADataSpace* outDataspace,
+ AHardwareBuffer_Format* outPixelFormat);
+
+/**
* Gets the current display configuration for the given display.
*
* Memory is *not* allocated for the caller. As such, the returned output