Skip to content

Commit

Permalink
Merge feature/sb17 into origin/main (#4096)
Browse files Browse the repository at this point in the history
b/360216121

Removes windows based builds and SB15, SB16 code
---------

Co-authored-by: Madhura Jayaraman <[email protected]>
Co-authored-by: Hao <[email protected]>
Co-authored-by: Jelle Foks <[email protected]>
Co-authored-by: Oscar Vestlie <[email protected]>
Co-authored-by: Yijia Zhang
<[email protected]>
Co-authored-by: Kaido Kert <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: xiaomings <[email protected]>
  • Loading branch information
9 people committed Sep 10, 2024
1 parent 8243f46 commit 3950b01
Show file tree
Hide file tree
Showing 774 changed files with 29 additions and 53,945 deletions.
20 changes: 0 additions & 20 deletions .github/config/evergreen-arm-hardfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
},
"platforms": [
"evergreen-arm-hardfp",
"evergreen-arm-hardfp-sbversion-15",
"evergreen-arm-hardfp-sbversion-16",
"evergreen-arm-hardfp-sbversion-17"
],
"includes": [
Expand All @@ -27,24 +25,6 @@
"evergreen_loader_extra_gn_arguments": "use_asan=false is_clang=false",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-15",
"platform":"evergreen-arm-hardfp-sbversion-15",
"target_platform":"evergreen-arm-hardfp",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"use_asan=false",
"evergreen_loader_extra_gn_arguments":"use_asan=false is_clang=false",
"sb_api_version": "15"
},
{
"name":"sbversion-16",
"platform":"evergreen-arm-hardfp-sbversion-16",
"target_platform":"evergreen-arm-hardfp",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"use_asan=false",
"evergreen_loader_extra_gn_arguments":"use_asan=false is_clang=false",
"sb_api_version": "16"
},
{
"name":"sbversion-17",
"platform":"evergreen-arm-hardfp-sbversion-17",
Expand Down
20 changes: 0 additions & 20 deletions .github/config/evergreen-arm-softfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
},
"platforms": [
"evergreen-arm-softfp",
"evergreen-arm-softfp-sbversion-15",
"evergreen-arm-softfp-sbversion-16",
"evergreen-arm-softfp-sbversion-17"
],
"includes": [
Expand All @@ -26,24 +24,6 @@
"extra_gn_arguments":"use_asan=false",
"evergreen_loader_extra_gn_arguments": "target_os=\\\"android\\\" sb_is_evergreen_compatible=true"
},
{
"name":"sbversion-15",
"platform":"evergreen-arm-softfp-sbversion-15",
"target_platform":"evergreen-arm-softfp",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"use_asan=false",
"sb_api_version":"15",
"evergreen_loader_extra_gn_arguments": "target_os=\\\"android\\\" sb_is_evergreen_compatible=true"
},
{
"name":"sbversion-16",
"platform":"evergreen-arm-softfp-sbversion-16",
"target_platform":"evergreen-arm-softfp",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"use_asan=false",
"sb_api_version":"16",
"evergreen_loader_extra_gn_arguments": "target_os=\\\"android\\\" sb_is_evergreen_compatible=true"
},
{
"name":"sbversion-17",
"platform":"evergreen-arm-softfp-sbversion-17",
Expand Down
20 changes: 0 additions & 20 deletions .github/config/evergreen-arm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"evergreen_loader": "android-arm64",
"platforms": [
"evergreen-arm64",
"evergreen-arm64-sbversion-15",
"evergreen-arm64-sbversion-16",
"evergreen-arm64-sbversion-17"
],
"includes": [
Expand All @@ -16,24 +14,6 @@
"extra_gn_arguments":"use_asan=false",
"evergreen_loader_extra_gn_arguments": "target_os=\\\"android\\\" sb_is_evergreen_compatible=true"
},
{
"name":"sbversion-15",
"platform":"evergreen-arm64-sbversion-15",
"target_platform":"evergreen-arm64",
"target_cpu":"target_cpu=\\\"arm64\\\"",
"extra_gn_arguments":"use_asan=false",
"sb_api_version":"15",
"evergreen_loader_extra_gn_arguments": "target_os=\\\"android\\\" sb_is_evergreen_compatible=true"
},
{
"name":"sbversion-16",
"platform":"evergreen-arm64-sbversion-16",
"target_platform":"evergreen-arm64",
"target_cpu":"target_cpu=\\\"arm64\\\"",
"extra_gn_arguments":"use_asan=false",
"sb_api_version":"16",
"evergreen_loader_extra_gn_arguments": "target_os=\\\"android\\\" sb_is_evergreen_compatible=true"
},
{
"name":"sbversion-17",
"platform":"evergreen-arm64-sbversion-17",
Expand Down
18 changes: 0 additions & 18 deletions .github/config/evergreen-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"on_host_test_shards": ["0", "1", "2", "3", "blackbox", "wpt", "evergreen"],
"platforms": [
"evergreen-x64",
"evergreen-x64-sbversion-15",
"evergreen-x64-sbversion-16",
"evergreen-x64-sbversion-17"
],
"includes": [
Expand All @@ -17,22 +15,6 @@
"target_cpu":"target_cpu=\\\"x64\\\"",
"extra_gn_arguments":"use_asan=false"
},
{
"name":"sbversion-15",
"platform":"evergreen-x64-sbversion-15",
"target_platform":"evergreen-x64",
"target_cpu":"target_cpu=\\\"x64\\\"",
"extra_gn_arguments":"use_asan=false",
"sb_api_version":"15"
},
{
"name":"sbversion-16",
"platform":"evergreen-x64-sbversion-16",
"target_platform":"evergreen-x64",
"target_cpu":"target_cpu=\\\"x64\\\"",
"extra_gn_arguments":"use_asan=false",
"sb_api_version":"16"
},
{
"name":"sbversion-17",
"platform":"evergreen-x64-sbversion-17",
Expand Down
14 changes: 0 additions & 14 deletions .github/config/linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"linux-x64x11",
"linux-x64x11-egl",
"linux-x64x11-skia",
"linux-x64x11-sbversion-15",
"linux-x64x11-sbversion-16",
"linux-x64x11-sbversion-17"
],
"includes": [
Expand All @@ -27,18 +25,6 @@
"platform":"linux-x64x11-skia",
"target_platform":"linux-x64x11-skia"
},
{
"name":"sbversion-15",
"platform":"linux-x64x11-sbversion-15",
"target_platform":"linux-x64x11",
"sb_api_version":"15"
},
{
"name":"sbversion-16",
"platform":"linux-x64x11-sbversion-16",
"target_platform":"linux-x64x11",
"sb_api_version":"16"
},
{
"name":"sbversion-17",
"platform":"linux-x64x11-sbversion-17",
Expand Down
18 changes: 0 additions & 18 deletions .github/config/raspi-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
},
"platforms": [
"raspi-2",
"raspi-2-sbversion-15",
"raspi-2-sbversion-16",
"raspi-2-sbversion-17"
],
"includes": [
Expand All @@ -25,22 +23,6 @@
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false"
},
{
"name":"sbversion-15",
"platform":"raspi-2-sbversion-15",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false",
"sb_api_version": "15"
},
{
"name":"sbversion-16",
"platform":"raspi-2-sbversion-16",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false",
"sb_api_version": "16"
},
{
"name":"sbversion-17",
"platform":"raspi-2-sbversion-17",
Expand Down
9 changes: 0 additions & 9 deletions base/synchronization/condition_variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@
#include "base/synchronization/lock.h"

#if defined(STARBOARD)
#if SB_API_VERSION < 16
#include "starboard/condition_variable.h"
#else
#include <pthread.h>
#endif // SB_API_VERSION < 16
#else
#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
#include <pthread.h>
Expand Down Expand Up @@ -122,13 +118,8 @@ class BASE_EXPORT ConditionVariable {

private:
#if defined(STARBOARD)
#if SB_API_VERSION < 16
SbConditionVariable condition_;
SbMutex* user_mutex_;
#else
pthread_cond_t condition_;
pthread_mutex_t* user_mutex_;
#endif // SB_API_VERSION < 16
#elif BUILDFLAG(IS_WIN)
CHROME_CONDITION_VARIABLE cv_;
const raw_ptr<CHROME_SRWLOCK> srwlock_;
Expand Down
32 changes: 0 additions & 32 deletions base/synchronization/condition_variable_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ ConditionVariable::ConditionVariable(Lock* user_lock)
user_lock_(user_lock)
#endif
{
#if SB_API_VERSION < 16
bool result = SbConditionVariableCreate(&condition_, user_mutex_);
DCHECK(result);
#else
#if !SB_HAS_QUIRK(NO_CONDATTR_SETCLOCK_SUPPORT)
pthread_condattr_t attribute;
pthread_condattr_init(&attribute);
Expand All @@ -47,17 +43,11 @@ ConditionVariable::ConditionVariable(Lock* user_lock)
int result = pthread_cond_init(&condition_, nullptr);
DCHECK(result == 0);
#endif // !SB_HAS_QUIRK(NO_CONDATTR_SETCLOCK_SUPPORT)
#endif // SB_API_VERSION < 16
}

ConditionVariable::~ConditionVariable() {
#if SB_API_VERSION < 16
bool result = SbConditionVariableDestroy(&condition_);
DCHECK(result);
#else
int result = pthread_cond_destroy(&condition_);
DCHECK(result == 0);
#endif // SB_API_VERSION < 16
}

void ConditionVariable::Wait() {
Expand All @@ -69,14 +59,8 @@ void ConditionVariable::Wait() {
#if DCHECK_IS_ON()
user_lock_->CheckHeldAndUnmark();
#endif
#if SB_API_VERSION < 16
SbConditionVariableResult result =
SbConditionVariableWait(&condition_, user_mutex_);
DCHECK(SbConditionVariableIsSignaled(result));
#else
int result = pthread_cond_wait(&condition_, user_mutex_);
DCHECK(result == 0);
#endif // SB_API_VERSION < 16
#if DCHECK_IS_ON()
user_lock_->CheckUnheldAndMark();
#endif
Expand All @@ -92,11 +76,6 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) {
#if DCHECK_IS_ON()
user_lock_->CheckHeldAndUnmark();
#endif
#if SB_API_VERSION < 16
SbConditionVariableResult result =
SbConditionVariableWaitTimed(&condition_, user_mutex_, duration);
DCHECK_NE(kSbConditionVariableFailed, result);
#else
#if !SB_HAS_QUIRK(NO_CONDATTR_SETCLOCK_SUPPORT)
int64_t timeout_time_usec = starboard::CurrentMonotonicTime();
#else
Expand All @@ -110,30 +89,19 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) {

int result = pthread_cond_timedwait(&condition_, user_mutex_, &timeout);
DCHECK(result == 0 || result == ETIMEDOUT);
#endif
#if DCHECK_IS_ON()
user_lock_->CheckUnheldAndMark();
#endif
}

void ConditionVariable::Broadcast() {
#if SB_API_VERSION < 16
bool result = SbConditionVariableBroadcast(&condition_);
DCHECK(result);
#else
int result = pthread_cond_broadcast(&condition_);
DCHECK(result == 0);
#endif // SB_API_VERSION < 16
}

void ConditionVariable::Signal() {
#if SB_API_VERSION < 16
bool result = SbConditionVariableSignal(&condition_);
DCHECK(result);
#else
int result = pthread_cond_signal(&condition_);
DCHECK(result == 0);
#endif // SB_API_VERSION < 16
}

} // namespace base
19 changes: 0 additions & 19 deletions base/synchronization/lock_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
#include "build/build_config.h"

#if defined(STARBOARD)
#if SB_API_VERSION < 16
#include "starboard/common/mutex.h"
#else
#include <pthread.h>
#endif
#include "base/check_op.h"
#elif BUILDFLAG(IS_WIN)
#include "base/win/windows_types.h"
Expand Down Expand Up @@ -53,11 +49,7 @@ class BASE_EXPORT LockImpl {
friend class base::win::internal::ScopedHandleVerifier;

#if defined(STARBOARD)
#if SB_API_VERSION < 16
using NativeHandle = SbMutex;
#else
using NativeHandle = pthread_mutex_t;
#endif // SB_API_VERSION < 16
#elif BUILDFLAG(IS_WIN)
using NativeHandle = CHROME_SRWLOCK;
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
Expand Down Expand Up @@ -108,24 +100,13 @@ void LockImpl::Lock() {

#if defined(STARBOARD)
bool LockImpl::Try() {
#if SB_API_VERSION < 16
SbMutexResult result = SbMutexAcquireTry(&native_handle_);
DCHECK_NE(kSbMutexDestroyed, result);
return SbMutexIsSuccess(result);
#else
int result = pthread_mutex_trylock(&native_handle_);
return result == 0;
#endif // SB_API_VERSION < 16
}

void LockImpl::Unlock() {
#if SB_API_VERSION < 16
bool result = SbMutexRelease(&native_handle_);
DCHECK(result);
#else
int result = pthread_mutex_unlock(&native_handle_);
DCHECK(result == 0);
#endif //SB_API_VERSION < 16
}
#elif BUILDFLAG(IS_WIN)
bool LockImpl::Try() {
Expand Down
19 changes: 0 additions & 19 deletions base/synchronization/lock_impl_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,22 @@

#include "base/check_op.h"

#if SB_API_VERSION < 16
#include "starboard/mutex.h"
#endif // SB_API_VERSION < 16

namespace base {
namespace internal {

LockImpl::LockImpl() {
#if SB_API_VERSION < 16
bool result = SbMutexCreate(&native_handle_);
DCHECK(result);
#else
int result = pthread_mutex_init(&native_handle_, nullptr);
DCHECK_EQ(result, 0);
#endif // SB_API_VERSION < 16
}

LockImpl::~LockImpl() {
#if SB_API_VERSION < 16
bool result = SbMutexDestroy(&native_handle_);
DCHECK(result);
#else
int result = pthread_mutex_destroy(&native_handle_);
DCHECK_EQ(result, 0);
#endif // SB_API_VERSION < 16
}

void LockImpl::LockInternal() {
#if SB_API_VERSION < 16
SbMutexResult result = SbMutexAcquire(&native_handle_);
DCHECK_NE(kSbMutexDestroyed, result);
#else
int result = pthread_mutex_lock(&native_handle_);
DCHECK_EQ(result, 0);
#endif // SB_API_VERSION < 16
}

} // namespace internal
Expand Down
Loading

0 comments on commit 3950b01

Please sign in to comment.