Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7e81c3a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix __ANDROID_API__ guards for libnativewindow"

parents 8978c7c1 6695fa8b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -154,6 +154,8 @@ typedef struct AHardwareBuffer_Desc {

typedef struct AHardwareBuffer AHardwareBuffer;

#if __ANDROID_API__ >= 26

/**
 * Allocates a buffer that backs an AHardwareBuffer using the passed
 * AHardwareBuffer_Desc.
@@ -246,6 +248,8 @@ int AHardwareBuffer_sendHandleToUnixSocket(const AHardwareBuffer* buffer, int so
 */
int AHardwareBuffer_recvHandleFromUnixSocket(int socketFd, AHardwareBuffer** outBuffer) __INTRODUCED_IN(26);

#endif // __ANDROID_API__ >= 26

__END_DECLS

#endif // ANDROID_HARDWARE_BUFFER_H
+12 −8
Original line number Diff line number Diff line
@@ -108,33 +108,33 @@ typedef struct ANativeWindow_Buffer {
 * Acquire a reference on the given {@link ANativeWindow} object. This prevents the object
 * from being deleted until the reference is removed.
 */
void ANativeWindow_acquire(ANativeWindow* window) __INTRODUCED_IN(26);
void ANativeWindow_acquire(ANativeWindow* window);

/**
 * Remove a reference that was previously acquired with {@link ANativeWindow_acquire()}.
 */
void ANativeWindow_release(ANativeWindow* window) __INTRODUCED_IN(26);
void ANativeWindow_release(ANativeWindow* window);

/**
 * Return the current width in pixels of the window surface.
 *
 * \return negative value on error.
 */
int32_t ANativeWindow_getWidth(ANativeWindow* window) __INTRODUCED_IN(26);
int32_t ANativeWindow_getWidth(ANativeWindow* window);

/**
 * Return the current height in pixels of the window surface.
 *
 * \return a negative value on error.
 */
int32_t ANativeWindow_getHeight(ANativeWindow* window) __INTRODUCED_IN(26);
int32_t ANativeWindow_getHeight(ANativeWindow* window);

/**
 * Return the current pixel format (AHARDWAREBUFFER_FORMAT_*) of the window surface.
 *
 * \return a negative value on error.
 */
int32_t ANativeWindow_getFormat(ANativeWindow* window) __INTRODUCED_IN(26);
int32_t ANativeWindow_getFormat(ANativeWindow* window);

/**
 * Change the format and size of the window buffers.
@@ -154,7 +154,7 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window) __INTRODUCED_IN(26);
 * \return 0 for success, or a negative value on error.
 */
int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window,
        int32_t width, int32_t height, int32_t format) __INTRODUCED_IN(26);
        int32_t width, int32_t height, int32_t format);

/**
 * Lock the window's next drawing surface for writing.
@@ -167,7 +167,7 @@ int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window,
 * \return 0 for success, or a negative value on error.
 */
int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
        ARect* inOutDirtyBounds) __INTRODUCED_IN(26);
        ARect* inOutDirtyBounds);

/**
 * Unlock the window's drawing surface after previously locking it,
@@ -175,7 +175,9 @@ int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffe
 *
 * \return 0 for success, or a negative value on error.
 */
int32_t ANativeWindow_unlockAndPost(ANativeWindow* window) __INTRODUCED_IN(26);
int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);

#if __ANDROID_API__ >= 26

/**
 * Set a transform that will be applied to future buffers posted to the window.
@@ -185,6 +187,8 @@ int32_t ANativeWindow_unlockAndPost(ANativeWindow* window) __INTRODUCED_IN(26);
 */
int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transform) __INTRODUCED_IN(26);

#endif // __ANDROID_API__ >= 26

#ifdef __cplusplus
};
#endif