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

Commit 933e81b5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[ANativeWindow] Add ANativeWindow_allocateBuffers stable abi."

parents 62748383 74aef6d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1176,6 +1176,10 @@ int Surface::perform(int operation, va_list args)
    case NATIVE_WINDOW_SET_QUEUE_INTERCEPTOR:
        res = dispatchAddQueueInterceptor(args);
        break;
    case NATIVE_WINDOW_ALLOCATE_BUFFERS:
        allocateBuffers();
        res = NO_ERROR;
        break;
    default:
        res = NAME_NOT_FOUND;
        break;
+4 −0
Original line number Diff line number Diff line
@@ -327,3 +327,7 @@ int ANativeWindow_setQueueBufferInterceptor(ANativeWindow* window,
                                            void* data) {
    return window->perform(window, NATIVE_WINDOW_SET_QUEUE_INTERCEPTOR, interceptor, data);
}

void ANativeWindow_allocateBuffers(ANativeWindow* window) {
    window->perform(window, NATIVE_WINDOW_ALLOCATE_BUFFERS);
}
+9 −1
Original line number Diff line number Diff line
@@ -200,8 +200,16 @@ int64_t ANativeWindow_getLastDequeueStartTime(ANativeWindow* window);
 * made by the window will return -ETIMEDOUT after the timeout if the dequeue
 * takes too long.
 *
 * \return NO_ERROR on succes, -errno on error.
 * \return NO_ERROR on success, -errno on error.
 */
int ANativeWindow_setDequeueTimeout(ANativeWindow* window, int64_t timeout);

/**
 * Provides a hint to the window that buffers should be preallocated ahead of
 * time. Note that the window implementation is not guaranteed to preallocate
 * any buffers, for instance if a private API disallows allocation of new
 * buffers. As such no success/error status is returned.
 */
void ANativeWindow_allocateBuffers(ANativeWindow* window);

__END_DECLS
+1 −0
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ enum {
    NATIVE_WINDOW_SET_DEQUEUE_INTERCEPTOR         = 42,    /* private */
    NATIVE_WINDOW_SET_PERFORM_INTERCEPTOR         = 43,    /* private */
    NATIVE_WINDOW_SET_QUEUE_INTERCEPTOR           = 44,    /* private */
    NATIVE_WINDOW_ALLOCATE_BUFFERS                = 45,    /* private */
    // clang-format on
};

+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ LIBNATIVEWINDOW {
    ANativeWindow_OemStorageGet; # llndk
    ANativeWindow_OemStorageSet; # llndk
    ANativeWindow_acquire;
    ANativeWindow_allocateBuffers; # apex # introduced=30
    ANativeWindow_cancelBuffer; # llndk
    ANativeWindow_dequeueBuffer; # llndk
    ANativeWindow_getBuffersDataSpace; # introduced=28