Add VNDK API to access AHardwareBuffer from ANativeWindowBuffer
this is to allow vendors to use AHardwareBuffer’s
lock/unlock on buffer dequeued from an
ANativeWindow.
Test: compiled
Bug: 36866217
Change-Id: If630105572ae0e57f6fda19c13e82150f415ed6b
diff --git a/libs/nativewindow/include/vndk/window.h b/libs/nativewindow/include/vndk/window.h
index 310e1e5..067046b 100644
--- a/libs/nativewindow/include/vndk/window.h
+++ b/libs/nativewindow/include/vndk/window.h
@@ -99,8 +99,12 @@
typedef struct ANativeWindowBuffer ANativeWindowBuffer;
-/*****************************************************************************/
+/*
+ * Convert this ANativeWindowBuffer into a AHardwareBuffer
+ */
+AHardwareBuffer* ANativeWindowBuffer_getHardwareBuffer(ANativeWindowBuffer* anwb);
+/*****************************************************************************/
/*
* Stores a value into one of the 4 available slots