Loading libs/gui/Surface.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading libs/nativewindow/ANativeWindow.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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); } libs/nativewindow/include/apex/window.h +9 −1 Original line number Diff line number Diff line Loading @@ -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 libs/nativewindow/include/system/window.h +1 −0 Original line number Diff line number Diff line Loading @@ -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 }; Loading libs/nativewindow/libnativewindow.map.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
libs/gui/Surface.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
libs/nativewindow/ANativeWindow.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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); }
libs/nativewindow/include/apex/window.h +9 −1 Original line number Diff line number Diff line Loading @@ -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
libs/nativewindow/include/system/window.h +1 −0 Original line number Diff line number Diff line Loading @@ -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 }; Loading
libs/nativewindow/libnativewindow.map.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading