Loading libs/nativewindow/ANativeWindow.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -165,6 +165,14 @@ int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate) { return native_window_set_frame_rate(window, frameRate); } void ANativeWindow_tryAllocateBuffers(ANativeWindow* window) { if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) { return; } window->perform(window, NATIVE_WINDOW_ALLOCATE_BUFFERS); } /************************************************************************************************** * vndk-stable **************************************************************************************************/ Loading Loading @@ -328,10 +336,6 @@ int ANativeWindow_setQueueBufferInterceptor(ANativeWindow* window, return window->perform(window, NATIVE_WINDOW_SET_QUEUE_INTERCEPTOR, interceptor, data); } void ANativeWindow_allocateBuffers(ANativeWindow* window) { window->perform(window, NATIVE_WINDOW_ALLOCATE_BUFFERS); } int64_t ANativeWindow_getNextFrameId(ANativeWindow* window) { return query64(window, NATIVE_WINDOW_GET_NEXT_FRAME_ID); } libs/nativewindow/include/android/native_window.h +11 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,17 @@ int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window) __INTRODUCED_IN */ int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate) __INTRODUCED_IN(30); /** * 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 an implementation disallows allocation of new * buffers, or if there is insufficient memory in the system to preallocate * additional buffers * * Available since API level 30. */ void ANativeWindow_tryAllocateBuffers(ANativeWindow* window); #endif // __ANDROID_API__ >= 30 #ifdef __cplusplus Loading libs/nativewindow/libnativewindow.map.txt +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ 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 @@ -51,6 +50,7 @@ LIBNATIVEWINDOW { ANativeWindow_setSwapInterval; # llndk ANativeWindow_setFrameRate; # introduced=30 ANativeWindow_setUsage; # llndk ANativeWindow_tryAllocateBuffers; # introduced=30 ANativeWindow_unlockAndPost; local: *; Loading Loading
libs/nativewindow/ANativeWindow.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -165,6 +165,14 @@ int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate) { return native_window_set_frame_rate(window, frameRate); } void ANativeWindow_tryAllocateBuffers(ANativeWindow* window) { if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) { return; } window->perform(window, NATIVE_WINDOW_ALLOCATE_BUFFERS); } /************************************************************************************************** * vndk-stable **************************************************************************************************/ Loading Loading @@ -328,10 +336,6 @@ int ANativeWindow_setQueueBufferInterceptor(ANativeWindow* window, return window->perform(window, NATIVE_WINDOW_SET_QUEUE_INTERCEPTOR, interceptor, data); } void ANativeWindow_allocateBuffers(ANativeWindow* window) { window->perform(window, NATIVE_WINDOW_ALLOCATE_BUFFERS); } int64_t ANativeWindow_getNextFrameId(ANativeWindow* window) { return query64(window, NATIVE_WINDOW_GET_NEXT_FRAME_ID); }
libs/nativewindow/include/android/native_window.h +11 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,17 @@ int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window) __INTRODUCED_IN */ int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate) __INTRODUCED_IN(30); /** * 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 an implementation disallows allocation of new * buffers, or if there is insufficient memory in the system to preallocate * additional buffers * * Available since API level 30. */ void ANativeWindow_tryAllocateBuffers(ANativeWindow* window); #endif // __ANDROID_API__ >= 30 #ifdef __cplusplus Loading
libs/nativewindow/libnativewindow.map.txt +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ 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 @@ -51,6 +50,7 @@ LIBNATIVEWINDOW { ANativeWindow_setSwapInterval; # llndk ANativeWindow_setFrameRate; # introduced=30 ANativeWindow_setUsage; # llndk ANativeWindow_tryAllocateBuffers; # introduced=30 ANativeWindow_unlockAndPost; local: *; Loading