From a37c6e8988883dc17cc57ed0831f6a911a07dea2 Mon Sep 17 00:00:00 2001 From: Ahmed Elzeiny Date: Tue, 26 Mar 2024 12:53:31 -0700 Subject: [PATCH] Add Starboard thread_sampler APIs to Android (#2689) Swaps Starboard's thread_sampler APIs for Android TV from stub to shared implementations (`//starboard/shared/stub/thread_sampler_*` to `//starboard/shared/pthread/thread_sampler_*`). Tested on Android TV (x64), Google TV Emulator (arm64), and a real Google TV device (arm). Test-On-Device: true b/330564529 Co-authored-by: Ahmed Elzeiny (cherry picked from commit 7984c7a5e9672c4b451c24bd4d0d1eae6c443525) --- starboard/android/shared/BUILD.gn | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/starboard/android/shared/BUILD.gn b/starboard/android/shared/BUILD.gn index 71aad0fbadb2..a34fdd56d6ed 100644 --- a/starboard/android/shared/BUILD.gn +++ b/starboard/android/shared/BUILD.gn @@ -166,6 +166,9 @@ static_library("starboard_platform") { "//starboard/shared/pthread/mutex_destroy.cc", "//starboard/shared/pthread/mutex_release.cc", "//starboard/shared/pthread/once.cc", + "//starboard/shared/pthread/thread_context_get_pointer.cc", + "//starboard/shared/pthread/thread_context_internal.cc", + "//starboard/shared/pthread/thread_context_internal.h", "//starboard/shared/pthread/thread_create_local_key.cc", "//starboard/shared/pthread/thread_create_priority.h", "//starboard/shared/pthread/thread_destroy_local_key.cc", @@ -174,6 +177,13 @@ static_library("starboard_platform") { "//starboard/shared/pthread/thread_get_local_value.cc", "//starboard/shared/pthread/thread_is_equal.cc", "//starboard/shared/pthread/thread_join.cc", + "//starboard/shared/pthread/thread_sampler_create.cc", + "//starboard/shared/pthread/thread_sampler_destroy.cc", + "//starboard/shared/pthread/thread_sampler_freeze.cc", + "//starboard/shared/pthread/thread_sampler_internal.cc", + "//starboard/shared/pthread/thread_sampler_internal.h", + "//starboard/shared/pthread/thread_sampler_is_supported.cc", + "//starboard/shared/pthread/thread_sampler_thaw.cc", "//starboard/shared/pthread/thread_set_local_value.cc", "//starboard/shared/pthread/thread_yield.cc", "//starboard/shared/signal/crash_signals.h", @@ -250,12 +260,6 @@ static_library("starboard_platform") { "//starboard/shared/stub/system_request_focus.cc", "//starboard/shared/stub/system_request_reveal.cc", "//starboard/shared/stub/system_sign_with_certification_secret_key.cc", - "//starboard/shared/stub/thread_context_get_pointer.cc", - "//starboard/shared/stub/thread_sampler_create.cc", - "//starboard/shared/stub/thread_sampler_destroy.cc", - "//starboard/shared/stub/thread_sampler_freeze.cc", - "//starboard/shared/stub/thread_sampler_is_supported.cc", - "//starboard/shared/stub/thread_sampler_thaw.cc", "//starboard/shared/stub/ui_nav_get_interface.cc", "accessibility_get_caption_settings.cc", "accessibility_get_display_settings.cc",