Loading libs/gui/Surface.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1084,6 +1084,9 @@ int Surface::perform(int operation, va_list args) case NATIVE_WINDOW_GET_LAST_DEQUEUE_START: res = dispatchGetLastDequeueStartTime(args); break; case NATIVE_WINDOW_SET_DEQUEUE_TIMEOUT: res = dispatchSetDequeueTimeout(args); break; default: res = NAME_NOT_FOUND; break; Loading Loading @@ -1295,6 +1298,11 @@ int Surface::dispatchGetLastDequeueStartTime(va_list args) { return NO_ERROR; } int Surface::dispatchSetDequeueTimeout(va_list args) { nsecs_t timeout = va_arg(args, int64_t); return setDequeueTimeout(timeout); } bool Surface::transformToDisplayInverse() { return (mTransform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY) == NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; Loading libs/gui/include/gui/Surface.h +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ private: int dispatchGetConsumerUsage64(va_list args); int dispatchSetAutoPrerotation(va_list args); int dispatchGetLastDequeueStartTime(va_list args); int dispatchSetDequeueTimeout(va_list args); bool transformToDisplayInverse(); protected: Loading libs/nativewindow/ANativeWindow.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -284,3 +284,7 @@ int64_t ANativeWindow_getLastDequeueStartTime(ANativeWindow* window) { int success = window->perform(window, NATIVE_WINDOW_GET_LAST_DEQUEUE_START, &time); return success < 0 ? success : time; } int ANativeWindow_setDequeueTimeout(ANativeWindow* window, int64_t timeout) { return window->perform(window, NATIVE_WINDOW_SET_DEQUEUE_TIMEOUT, timeout); } libs/nativewindow/include/apex/window.h +9 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,13 @@ int ANativeWindow_getLastQueueDuration(ANativeWindow* window); */ int64_t ANativeWindow_getLastDequeueStartTime(ANativeWindow* window); /** * Sets a timeout in nanoseconds for dequeue calls. All subsequent dequeue calls * made by the window will return -ETIMEDOUT after the timeout if the dequeue * takes too long. * * \return NO_ERROR on succes, -errno on error. */ int ANativeWindow_setDequeueTimeout(ANativeWindow* window, int64_t timeout); __END_DECLS libs/nativewindow/include/system/window.h +1 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,7 @@ enum { NATIVE_WINDOW_SET_BUFFERS_HDR10_PLUS_METADATA = 34, NATIVE_WINDOW_SET_AUTO_PREROTATION = 35, NATIVE_WINDOW_GET_LAST_DEQUEUE_START = 36, /* private */ NATIVE_WINDOW_SET_DEQUEUE_TIMEOUT = 37, /* private */ // clang-format on }; Loading Loading
libs/gui/Surface.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1084,6 +1084,9 @@ int Surface::perform(int operation, va_list args) case NATIVE_WINDOW_GET_LAST_DEQUEUE_START: res = dispatchGetLastDequeueStartTime(args); break; case NATIVE_WINDOW_SET_DEQUEUE_TIMEOUT: res = dispatchSetDequeueTimeout(args); break; default: res = NAME_NOT_FOUND; break; Loading Loading @@ -1295,6 +1298,11 @@ int Surface::dispatchGetLastDequeueStartTime(va_list args) { return NO_ERROR; } int Surface::dispatchSetDequeueTimeout(va_list args) { nsecs_t timeout = va_arg(args, int64_t); return setDequeueTimeout(timeout); } bool Surface::transformToDisplayInverse() { return (mTransform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY) == NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; Loading
libs/gui/include/gui/Surface.h +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ private: int dispatchGetConsumerUsage64(va_list args); int dispatchSetAutoPrerotation(va_list args); int dispatchGetLastDequeueStartTime(va_list args); int dispatchSetDequeueTimeout(va_list args); bool transformToDisplayInverse(); protected: Loading
libs/nativewindow/ANativeWindow.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -284,3 +284,7 @@ int64_t ANativeWindow_getLastDequeueStartTime(ANativeWindow* window) { int success = window->perform(window, NATIVE_WINDOW_GET_LAST_DEQUEUE_START, &time); return success < 0 ? success : time; } int ANativeWindow_setDequeueTimeout(ANativeWindow* window, int64_t timeout) { return window->perform(window, NATIVE_WINDOW_SET_DEQUEUE_TIMEOUT, timeout); }
libs/nativewindow/include/apex/window.h +9 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,13 @@ int ANativeWindow_getLastQueueDuration(ANativeWindow* window); */ int64_t ANativeWindow_getLastDequeueStartTime(ANativeWindow* window); /** * Sets a timeout in nanoseconds for dequeue calls. All subsequent dequeue calls * made by the window will return -ETIMEDOUT after the timeout if the dequeue * takes too long. * * \return NO_ERROR on succes, -errno on error. */ int ANativeWindow_setDequeueTimeout(ANativeWindow* window, int64_t timeout); __END_DECLS
libs/nativewindow/include/system/window.h +1 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,7 @@ enum { NATIVE_WINDOW_SET_BUFFERS_HDR10_PLUS_METADATA = 34, NATIVE_WINDOW_SET_AUTO_PREROTATION = 35, NATIVE_WINDOW_GET_LAST_DEQUEUE_START = 36, /* private */ NATIVE_WINDOW_SET_DEQUEUE_TIMEOUT = 37, /* private */ // clang-format on }; Loading