diff options
Diffstat (limited to 'libs/nativewindow/include/vndk/hardware_buffer.h')
-rw-r--r-- | libs/nativewindow/include/vndk/hardware_buffer.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/libs/nativewindow/include/vndk/hardware_buffer.h b/libs/nativewindow/include/vndk/hardware_buffer.h index 50fe0b7423..3392d7f094 100644 --- a/libs/nativewindow/include/vndk/hardware_buffer.h +++ b/libs/nativewindow/include/vndk/hardware_buffer.h @@ -24,14 +24,7 @@ __BEGIN_DECLS -/** - * Get the native handle from an AHardwareBuffer. - * - * \return a non-NULL native handle on success, NULL if \a buffer is nullptr or the operation fails - * for any reason. - */ -const native_handle_t* _Nullable AHardwareBuffer_getNativeHandle( - const AHardwareBuffer* _Nonnull buffer); +const native_handle_t* AHardwareBuffer_getNativeHandle(const AHardwareBuffer* buffer); enum CreateFromHandleMethod { // enum values chosen to match internal GraphicBuffer::HandleWrapMethod @@ -40,9 +33,9 @@ enum CreateFromHandleMethod { }; /** - * Create an AHardwareBuffer from a native handle. + * Create a AHardwareBuffer from a native handle. * - * This function wraps a native handle in an AHardwareBuffer suitable for use by applications or + * This function wraps a native handle in a AHardwareBuffer suitable for use by applications or * other parts of the system. The contents of desc will be returned by AHardwareBuffer_describe(). * * If method is AHARDWAREBUFFER_CREATE_FROM_HANDLE_METHOD_REGISTER, the handle is assumed to be @@ -51,13 +44,10 @@ enum CreateFromHandleMethod { * * If method is AHARDWAREBUFFER_CREATE_FROM_HANDLE_METHOD_CLONE, the handle will be cloned and the * clone registered. The AHardwareBuffer will own the cloned handle but not the original. - * - * \return 0 on success, -EINVAL if \a desc or \a handle or outBuffer is NULL, or an error number if - * the operation fails for any reason. */ -int AHardwareBuffer_createFromHandle(const AHardwareBuffer_Desc* _Nonnull desc, - const native_handle_t* _Nonnull handle, int32_t method, - AHardwareBuffer* _Nullable* _Nonnull outBuffer); +int AHardwareBuffer_createFromHandle(const AHardwareBuffer_Desc* desc, + const native_handle_t* handle, int32_t method, + AHardwareBuffer** outBuffer); /** * Buffer pixel formats. |