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

Commit ca87ad94 authored by Alec Mouri's avatar Alec Mouri
Browse files

[ANativeWindow] add ANativeWindow_getNextFrameId api.

Stable API for getNextFrameNumber. Here the naming is mirroring the
existing EGL api for eglGetNextFrameIdANDROID.

Bug: 137012798
Test: builds
Change-Id: I8bf6fb198055a295b8aa68d3b9db2577376d39b1
parent 5a377dd1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -331,3 +331,7 @@ int ANativeWindow_setQueueBufferInterceptor(ANativeWindow* window,
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);
}
+7 −0
Original line number Diff line number Diff line
@@ -212,4 +212,11 @@ int ANativeWindow_setDequeueTimeout(ANativeWindow* window, int64_t timeout);
 */
void ANativeWindow_allocateBuffers(ANativeWindow* window);

/**
 * Retrieves an identifier for the next frame to be queued by this window.
 *
 * \return -errno on error, otherwise returns the next frame id.
 */
int64_t ANativeWindow_getNextFrameId(ANativeWindow* window);

__END_DECLS
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ LIBNATIVEWINDOW {
    ANativeWindow_getLastDequeueDuration; # apex # introduced=30
    ANativeWindow_getLastDequeueStartTime; # apex # introduced=30
    ANativeWindow_getLastQueueDuration; # apex # introduced=30
    ANativeWindow_getNextFrameId; # apex # introduced=30
    ANativeWindow_getWidth;
    ANativeWindow_lock;
    ANativeWindow_query; # llndk