1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 16:57:36 +00:00

Ladybird/Android: Add EventLoopImplementation for ALooper

Timers run in their own thread, to take advantage of existing Java
Executor features. By hooking into ALooper, we can spin the main
Activity's UI thread event loop without causing a fuss, or spinning the
CPU by just polling our event loop constantly.
This commit is contained in:
Andrew Kaster 2023-09-08 22:12:42 -06:00 committed by Andrew Kaster
parent d63fb8fa61
commit d93911928b
11 changed files with 510 additions and 40 deletions

View file

@ -148,8 +148,10 @@ elseif(ANDROID)
${SOURCES}
Android/src/main/cpp/LadybirdActivity.cpp
Android/src/main/cpp/WebViewImplementationNative.cpp
Android/src/main/cpp/ALooperEventLoopImplementation.cpp
Android/src/main/cpp/TimerExecutorService.cpp
)
target_link_libraries(ladybird PRIVATE log jnigraphics)
target_link_libraries(ladybird PRIVATE log jnigraphics android)
else()
# TODO: Check for other GUI frameworks here when we move them in-tree
# For now, we can export a static library of common files for chromes to link to