OSDN Git Service

Merge "Add __INTRODUCED_IN annotations to <android/hardware_buffer.h>."
authorElliott Hughes <enh@google.com>
Mon, 18 Jun 2018 19:32:03 +0000 (12:32 -0700)
committerandroid-build-merger <android-build-merger@google.com>
Mon, 18 Jun 2018 19:32:03 +0000 (12:32 -0700)
am: 28046cb2d7

Change-Id: Idb5e04c6dd2ec32b8f0aadb10acec5b6cd1d70b7

1  2 
libs/nativewindow/include/android/hardware_buffer.h

@@@ -219,11 -158,11 +219,11 @@@ typedef struct AHardwareBuffer AHardwar
   * Allocates a buffer that backs an AHardwareBuffer using the passed
   * AHardwareBuffer_Desc.
   *
 - * Returns NO_ERROR on success, or an error number of the allocation fails for
 - * any reason.
 + * \return 0 on success, or an error number of the allocation fails for
 + * any reason. The returned buffer has a reference count of 1.
   */
  int AHardwareBuffer_allocate(const AHardwareBuffer_Desc* desc,
-         AHardwareBuffer** outBuffer);
+         AHardwareBuffer** outBuffer) __INTRODUCED_IN(26);
  /**
   * Acquire a reference on the given AHardwareBuffer object.  This prevents the
   * object from being deleted until the last reference is removed.
@@@ -241,9 -180,9 +241,9 @@@ void AHardwareBuffer_release(AHardwareB
   * AHardwareBuffer_Desc struct.
   */
  void AHardwareBuffer_describe(const AHardwareBuffer* buffer,
-         AHardwareBuffer_Desc* outDesc);
+         AHardwareBuffer_Desc* outDesc) __INTRODUCED_IN(26);
  
 -/*
 +/**
   * Lock the AHardwareBuffer for reading or writing, depending on the usage flags
   * passed.  This call may block if the hardware needs to finish rendering or if
   * CPU caches need to be synchronized, or possibly for other implementation-
   * number of the lock fails for any reason.
   */
  int AHardwareBuffer_lock(AHardwareBuffer* buffer, uint64_t usage,
-         int32_t fence, const ARect* rect, void** outVirtualAddress);
+         int32_t fence, const ARect* rect, void** outVirtualAddress) __INTRODUCED_IN(26);
  
 -/*
 +/**
   * Unlock the AHardwareBuffer; must be called after all changes to the buffer
   * are completed by the caller. If fence is not NULL then it will be set to a
   * file descriptor that is signaled when all pending work on the buffer is
   * completed. The caller is responsible for closing the fence when it is no
   * longer needed.
   *
 - * Returns NO_ERROR on success, BAD_VALUE if the buffer is NULL, or an error
 - * number of the lock fails for any reason.
 + * \return 0 on success, -EINVAL if \a buffer is NULL, or an error
 + * number if the unlock fails for any reason.
   */
- int AHardwareBuffer_unlock(AHardwareBuffer* buffer, int32_t* fence);
+ int AHardwareBuffer_unlock(AHardwareBuffer* buffer, int32_t* fence) __INTRODUCED_IN(26);
  
 -/*
 +/**
   * Send the AHardwareBuffer to an AF_UNIX socket.
   *
 - * Returns NO_ERROR on success, BAD_VALUE if the buffer is NULL, or an error
 - * number of the lock fails for any reason.
 + * \return 0 on success, -EINVAL if \a buffer is NULL, or an error
 + * number if the operation fails for any reason.
   */
- int AHardwareBuffer_sendHandleToUnixSocket(const AHardwareBuffer* buffer, int socketFd);
+ int AHardwareBuffer_sendHandleToUnixSocket(const AHardwareBuffer* buffer, int socketFd) __INTRODUCED_IN(26);
  
 -/*
 +/**
   * Receive the AHardwareBuffer from an AF_UNIX socket.
   *
 - * Returns NO_ERROR on success, BAD_VALUE if the buffer is NULL, or an error
 - * number of the lock fails for any reason.
 + * \return 0 on success, -EINVAL if \a outBuffer is NULL, or an error
 + * number if the operation fails for any reason.
   */
- int AHardwareBuffer_recvHandleFromUnixSocket(int socketFd, AHardwareBuffer** outBuffer);
+ int AHardwareBuffer_recvHandleFromUnixSocket(int socketFd, AHardwareBuffer** outBuffer) __INTRODUCED_IN(26);
  
  __END_DECLS