1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:27:45 +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

@ -53,8 +53,12 @@ else()
)
if (ANDROID)
target_sources(webcontent PRIVATE ../Android/src/main/cpp/WebContentService.cpp)
target_link_libraries(webcontent PRIVATE log)
target_sources(webcontent PRIVATE
../Android/src/main/cpp/WebContentService.cpp
../Android/src/main/cpp/ALooperEventLoopImplementation.cpp
../Android/src/main/cpp/TimerExecutorService.cpp
)
target_link_libraries(webcontent PRIVATE log android)
endif()
add_executable(WebContent main.cpp)