mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 03:17:31 +09:00
Compare commits
No commits in common. "6569a453d2d1c4fd0feda6ae2791fc03d738005a" and "77cfca739d79e679522ccb87ba2efcba077081c7" have entirely different histories.
6569a453d2
...
77cfca739d
23 changed files with 77 additions and 212 deletions
6
config/external/lgpllibs/moz.build
vendored
6
config/external/lgpllibs/moz.build
vendored
|
|
@ -11,9 +11,3 @@
|
||||||
|
|
||||||
GeckoSharedLibrary('lgpllibs', linkage=None)
|
GeckoSharedLibrary('lgpllibs', linkage=None)
|
||||||
SHARED_LIBRARY_NAME = 'lgpllibs'
|
SHARED_LIBRARY_NAME = 'lgpllibs'
|
||||||
|
|
||||||
if CONFIG['CLANG_CL']:
|
|
||||||
# SoundTouch uses clang's OpenMP runtime. Link its import library into the
|
|
||||||
# containing LGPL DLL and place the runtime beside the browser binaries.
|
|
||||||
OS_LIBS += ['C:/clang/lib/libomp']
|
|
||||||
FINAL_TARGET_FILES += ['C:/clang/bin/libomp.dll']
|
|
||||||
|
|
|
||||||
8
config/external/nss/Makefile.in
vendored
8
config/external/nss/Makefile.in
vendored
|
|
@ -262,13 +262,6 @@ ifeq (WINNT,$(OS_TARGET))
|
||||||
NSS_XCFLAGS += $(filter -arch:%,$(CFLAGS))
|
NSS_XCFLAGS += $(filter -arch:%,$(CFLAGS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# freebl's x86 AES/GCM sources use AES-NI and PCLMUL intrinsics. The nested
|
|
||||||
# NSS build's per-object flags are not propagated through this wrapper when
|
|
||||||
# using clang-cl, so pass them explicitly.
|
|
||||||
ifeq (1,$(CLANG_CL))
|
|
||||||
NSS_XCFLAGS += -maes -mpclmul
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Enable short header experiment. Firefox only.
|
# Enable short header experiment. Firefox only.
|
||||||
NSS_XCFLAGS += -DNSS_ENABLE_TLS13_SHORT_HEADERS
|
NSS_XCFLAGS += -DNSS_ENABLE_TLS13_SHORT_HEADERS
|
||||||
|
|
||||||
|
|
@ -473,3 +466,4 @@ endif # MOZ_FOLD_LIBS
|
||||||
# Work around NSS build system race condition creating certdata.c in
|
# Work around NSS build system race condition creating certdata.c in
|
||||||
# security/nss/lib/ckfw/builtins. See bug #836220.
|
# security/nss/lib/ckfw/builtins. See bug #836220.
|
||||||
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)
|
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27219,11 +27219,6 @@ static malloc_zone_t* _sqliteZone_;
|
||||||
#if HAVE_MALLOC_H && HAVE_MALLOC_USABLE_SIZE
|
#if HAVE_MALLOC_H && HAVE_MALLOC_USABLE_SIZE
|
||||||
# define SQLITE_USE_MALLOC_H 1
|
# define SQLITE_USE_MALLOC_H 1
|
||||||
# define SQLITE_USE_MALLOC_USABLE_SIZE 1
|
# define SQLITE_USE_MALLOC_USABLE_SIZE 1
|
||||||
# if defined(_WIN32)
|
|
||||||
/* Mozilla's jemalloc wrapper provides this symbol, but the Windows
|
|
||||||
* malloc.h does not declare it for clang-cl. */
|
|
||||||
extern size_t malloc_usable_size(void *);
|
|
||||||
# endif
|
|
||||||
/*
|
/*
|
||||||
** The MSVCRT has malloc_usable_size(), but it is called _msize(). The
|
** The MSVCRT has malloc_usable_size(), but it is called _msize(). The
|
||||||
** use of _msize() is automatic, but can be disabled by compiling with
|
** use of _msize() is automatic, but can be disabled by compiling with
|
||||||
|
|
|
||||||
|
|
@ -2927,11 +2927,12 @@ FindMatchingElementsWithId(const nsAString& aId, nsINode* aRoot,
|
||||||
// Actually find elements matching aSelectorList (which must not be
|
// Actually find elements matching aSelectorList (which must not be
|
||||||
// null) and which are descendants of aRoot and put them in aList. If
|
// null) and which are descendants of aRoot and put them in aList. If
|
||||||
// onlyFirstMatch, then stop once the first one is found.
|
// onlyFirstMatch, then stop once the first one is found.
|
||||||
template<bool onlyFirstMatch, class T>
|
template<bool onlyFirstMatch, class Collector, class T>
|
||||||
static void
|
static void
|
||||||
FindMatchingElementsWithClass(nsINode* aRoot, nsIAtom* aClass,
|
FindMatchingElementsWithClass(nsINode* aRoot, nsIAtom* aClass,
|
||||||
nsCaseTreatment aCaseTreatment, T& aList)
|
nsCaseTreatment aCaseTreatment, T& aList)
|
||||||
{
|
{
|
||||||
|
Collector results;
|
||||||
for (nsIContent* cur = aRoot->GetFirstChild(); cur;
|
for (nsIContent* cur = aRoot->GetFirstChild(); cur;
|
||||||
cur = cur->GetNextNode(aRoot)) {
|
cur = cur->GetNextNode(aRoot)) {
|
||||||
if (!cur->IsElement()) {
|
if (!cur->IsElement()) {
|
||||||
|
|
@ -2943,7 +2944,14 @@ FindMatchingElementsWithClass(nsINode* aRoot, nsIAtom* aClass,
|
||||||
aList.AppendElement(cur->AsElement());
|
aList.AppendElement(cur->AsElement());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
aList.AppendElement(cur->AsElement());
|
results.AppendElement(cur->AsElement());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const uint32_t len = results.Length();
|
||||||
|
if (len) {
|
||||||
|
aList.SetCapacity(len);
|
||||||
|
for (uint32_t i = 0; i < len; ++i) {
|
||||||
|
aList.AppendElement(results.ElementAt(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2967,7 +2975,7 @@ FindMatchingElements(nsINode* aRoot, nsCSSSelectorList* aSelectorList, T &aList,
|
||||||
nsCaseTreatment caseTreatment =
|
nsCaseTreatment caseTreatment =
|
||||||
doc->GetCompatibilityMode() == eCompatibility_NavQuirks
|
doc->GetCompatibilityMode() == eCompatibility_NavQuirks
|
||||||
? eIgnoreCase : eCaseMatters;
|
? eIgnoreCase : eCaseMatters;
|
||||||
FindMatchingElementsWithClass<onlyFirstMatch>(
|
FindMatchingElementsWithClass<onlyFirstMatch, Collector>(
|
||||||
aRoot, selector->mClassList->mAtom, caseTreatment, aList);
|
aRoot, selector->mClassList->mAtom, caseTreatment, aList);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3694,12 +3694,12 @@ PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow)
|
||||||
WINDOWPOS winpos = {
|
WINDOWPOS winpos = {
|
||||||
0, 0,
|
0, 0,
|
||||||
mWindow.x, mWindow.y,
|
mWindow.x, mWindow.y,
|
||||||
static_cast<int>(mWindow.width), static_cast<int>(mWindow.height),
|
mWindow.width, mWindow.height,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
NPEvent pluginEvent = {
|
NPEvent pluginEvent = {
|
||||||
WM_WINDOWPOSCHANGED, 0,
|
WM_WINDOWPOSCHANGED, 0,
|
||||||
reinterpret_cast<uintptr_t>(&winpos)
|
(LPARAM) &winpos
|
||||||
};
|
};
|
||||||
mPluginIface->event(&mData, &pluginEvent);
|
mPluginIface->event(&mData, &pluginEvent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1355,7 +1355,7 @@ public:
|
||||||
rv = httpChannel->GetReferrerPolicy(&referrerPolicy);
|
rv = httpChannel->GetReferrerPolicy(&referrerPolicy);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
switch (referrerPolicy) {
|
switch (referrerPolicy) {
|
||||||
case static_cast<uint32_t>(nsIHttpChannel::REFERRER_POLICY_UNSET):
|
case nsIHttpChannel::REFERRER_POLICY_UNSET:
|
||||||
mReferrerPolicy = ReferrerPolicy::_empty;
|
mReferrerPolicy = ReferrerPolicy::_empty;
|
||||||
break;
|
break;
|
||||||
case nsIHttpChannel::REFERRER_POLICY_NO_REFERRER:
|
case nsIHttpChannel::REFERRER_POLICY_NO_REFERRER:
|
||||||
|
|
|
||||||
|
|
@ -2774,7 +2774,7 @@ _cairo_d2d_copy_surface(cairo_d2d_surface_t *dst,
|
||||||
cairo_rectangle_int_t transformed_rect = { area_to_copy.x + translation->x,
|
cairo_rectangle_int_t transformed_rect = { area_to_copy.x + translation->x,
|
||||||
area_to_copy.y + translation->y,
|
area_to_copy.y + translation->y,
|
||||||
area_to_copy.width, area_to_copy.height };
|
area_to_copy.width, area_to_copy.height };
|
||||||
cairo_rectangle_int_t surface_rect = { 0, 0, static_cast<int>(srcDesc.Width), static_cast<int>(srcDesc.Height) };
|
cairo_rectangle_int_t surface_rect = { 0, 0, srcDesc.Width, srcDesc.Height };
|
||||||
|
|
||||||
|
|
||||||
if (!_cairo_rectangle_contains(&surface_rect, &transformed_rect)) {
|
if (!_cairo_rectangle_contains(&surface_rect, &transformed_rect)) {
|
||||||
|
|
@ -2989,8 +2989,8 @@ _cairo_d2d_try_fastblit(cairo_d2d_surface_t *dst,
|
||||||
|
|
||||||
// Areas outside of the surface do not matter.
|
// Areas outside of the surface do not matter.
|
||||||
cairo_rectangle_int_t surface_rect = { 0, 0,
|
cairo_rectangle_int_t surface_rect = { 0, 0,
|
||||||
static_cast<int>(dst->rt->GetPixelSize().width),
|
dst->rt->GetPixelSize().width,
|
||||||
static_cast<int>(dst->rt->GetPixelSize().height) };
|
dst->rt->GetPixelSize().height };
|
||||||
cairo_region_intersect_rectangle(region, &surface_rect);
|
cairo_region_intersect_rectangle(region, &surface_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,13 +162,6 @@ SOURCES += [
|
||||||
'xiph.c'
|
'xiph.c'
|
||||||
]
|
]
|
||||||
|
|
||||||
# dummy_funcs.c intentionally provides tentative definitions for FFmpeg
|
|
||||||
# objects that are disabled by the generated configuration. Clang's default
|
|
||||||
# -fno-common turns those placeholders into duplicate definitions when an
|
|
||||||
# enabled codec supplies the real object.
|
|
||||||
if CONFIG['CLANG_CL']:
|
|
||||||
SOURCES['dummy_funcs.c'].flags += ['-fcommon']
|
|
||||||
|
|
||||||
SYMBOLS_FILE = 'avcodec.symbols'
|
SYMBOLS_FILE = 'avcodec.symbols'
|
||||||
NO_VISIBILITY_FLAGS = True
|
NO_VISIBILITY_FLAGS = True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,7 @@ static inline void atomic_int_set_win32(volatile int *ptr, int val)
|
||||||
#define avpriv_atomic_int_add_and_fetch atomic_int_add_and_fetch_win32
|
#define avpriv_atomic_int_add_and_fetch atomic_int_add_and_fetch_win32
|
||||||
static inline int atomic_int_add_and_fetch_win32(volatile int *ptr, int inc)
|
static inline int atomic_int_add_and_fetch_win32(volatile int *ptr, int inc)
|
||||||
{
|
{
|
||||||
/* Windows int and LONG are both 32-bit, but have distinct C types. */
|
return inc + InterlockedExchangeAdd(ptr, inc);
|
||||||
return inc + InterlockedExchangeAdd((volatile LONG *)ptr, inc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define avpriv_atomic_ptr_cas atomic_ptr_cas_win32
|
#define avpriv_atomic_ptr_cas atomic_ptr_cas_win32
|
||||||
|
|
|
||||||
|
|
@ -85,24 +85,10 @@ COLD int dav1d_num_logical_processors(Dav1dContext *const c) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
GROUP_AFFINITY affinity;
|
GROUP_AFFINITY affinity;
|
||||||
DWORD_PTR mask = 0, system_mask;
|
if (GetThreadGroupAffinity(GetCurrentThread(), &affinity)) {
|
||||||
HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
|
int num_processors = 1;
|
||||||
typedef BOOL (WINAPI *get_thread_group_affinity_fn)(HANDLE, PGROUP_AFFINITY);
|
while (affinity.Mask &= affinity.Mask - 1)
|
||||||
get_thread_group_affinity_fn get_thread_group_affinity = kernel32 ?
|
|
||||||
(get_thread_group_affinity_fn)GetProcAddress(kernel32, "GetThreadGroupAffinity") : NULL;
|
|
||||||
|
|
||||||
/* Processor groups are only available on Windows 7 and later. */
|
|
||||||
if (get_thread_group_affinity &&
|
|
||||||
get_thread_group_affinity(GetCurrentThread(), &affinity))
|
|
||||||
mask = affinity.Mask;
|
|
||||||
else if (!GetProcessAffinityMask(GetCurrentProcess(), &mask, &system_mask))
|
|
||||||
mask = 0;
|
|
||||||
|
|
||||||
if (mask) {
|
|
||||||
int num_processors = 0;
|
|
||||||
do {
|
|
||||||
num_processors++;
|
num_processors++;
|
||||||
} while (mask &= mask - 1);
|
|
||||||
return num_processors;
|
return num_processors;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#define PTHREAD_MUTEX_INITIALIZER { 0 }
|
#define PTHREAD_MUTEX_INITIALIZER SRWLOCK_INIT
|
||||||
#define PTHREAD_ONCE_INIT 0
|
#define PTHREAD_ONCE_INIT INIT_ONCE_STATIC_INIT
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
|
|
@ -46,16 +46,9 @@ typedef struct {
|
||||||
unsigned stack_size;
|
unsigned stack_size;
|
||||||
} pthread_attr_t;
|
} pthread_attr_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef SRWLOCK pthread_mutex_t;
|
||||||
volatile LONG state;
|
typedef CONDITION_VARIABLE pthread_cond_t;
|
||||||
CRITICAL_SECTION cs;
|
typedef INIT_ONCE pthread_once_t;
|
||||||
} pthread_mutex_t;
|
|
||||||
struct dav1d_cond_waiter;
|
|
||||||
typedef struct {
|
|
||||||
CRITICAL_SECTION cs;
|
|
||||||
struct dav1d_cond_waiter *head;
|
|
||||||
} pthread_cond_t;
|
|
||||||
typedef volatile LONG pthread_once_t;
|
|
||||||
|
|
||||||
void dav1d_init_thread(void);
|
void dav1d_init_thread(void);
|
||||||
void dav1d_set_thread_name(const wchar_t *name);
|
void dav1d_set_thread_name(const wchar_t *name);
|
||||||
|
|
@ -91,51 +84,50 @@ static inline int pthread_attr_setstacksize(pthread_attr_t *const attr,
|
||||||
static inline int pthread_mutex_init(pthread_mutex_t *const mutex,
|
static inline int pthread_mutex_init(pthread_mutex_t *const mutex,
|
||||||
const void *const attr)
|
const void *const attr)
|
||||||
{
|
{
|
||||||
mutex->state = 0;
|
InitializeSRWLock(mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pthread_mutex_destroy(pthread_mutex_t *const mutex) {
|
static inline int pthread_mutex_destroy(pthread_mutex_t *const mutex) {
|
||||||
if (mutex->state == 2) DeleteCriticalSection(&mutex->cs);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pthread_mutex_lock(pthread_mutex_t *const mutex) {
|
static inline int pthread_mutex_lock(pthread_mutex_t *const mutex) {
|
||||||
if (InterlockedCompareExchange(&mutex->state, 1, 0) == 0) {
|
AcquireSRWLockExclusive(mutex);
|
||||||
InitializeCriticalSection(&mutex->cs);
|
|
||||||
InterlockedExchange(&mutex->state, 2);
|
|
||||||
} else {
|
|
||||||
while (InterlockedCompareExchange(&mutex->state, 2, 2) != 2)
|
|
||||||
Sleep(1);
|
|
||||||
}
|
|
||||||
EnterCriticalSection(&mutex->cs);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pthread_mutex_unlock(pthread_mutex_t *const mutex) {
|
static inline int pthread_mutex_unlock(pthread_mutex_t *const mutex) {
|
||||||
LeaveCriticalSection(&mutex->cs);
|
ReleaseSRWLockExclusive(mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pthread_cond_init(pthread_cond_t *const cond,
|
static inline int pthread_cond_init(pthread_cond_t *const cond,
|
||||||
const void *const attr)
|
const void *const attr)
|
||||||
{
|
{
|
||||||
InitializeCriticalSection(&cond->cs);
|
InitializeConditionVariable(cond);
|
||||||
cond->head = NULL;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pthread_cond_destroy(pthread_cond_t *const cond) {
|
static inline int pthread_cond_destroy(pthread_cond_t *const cond) {
|
||||||
DeleteCriticalSection(&cond->cs);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define pthread_cond_wait dav1d_pthread_cond_wait
|
static inline int pthread_cond_wait(pthread_cond_t *const cond,
|
||||||
#define pthread_cond_signal dav1d_pthread_cond_signal
|
pthread_mutex_t *const mutex)
|
||||||
#define pthread_cond_broadcast dav1d_pthread_cond_broadcast
|
{
|
||||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
return !SleepConditionVariableSRW(cond, mutex, INFINITE, 0);
|
||||||
int pthread_cond_signal(pthread_cond_t *cond);
|
}
|
||||||
int pthread_cond_broadcast(pthread_cond_t *cond);
|
|
||||||
|
static inline int pthread_cond_signal(pthread_cond_t *const cond) {
|
||||||
|
WakeConditionVariable(cond);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int pthread_cond_broadcast(pthread_cond_t *const cond) {
|
||||||
|
WakeAllConditionVariable(cond);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,73 +85,15 @@ COLD int dav1d_pthread_join(pthread_t *const thread, void **const res) {
|
||||||
COLD int dav1d_pthread_once(pthread_once_t *const once_control,
|
COLD int dav1d_pthread_once(pthread_once_t *const once_control,
|
||||||
void (*const init_routine)(void))
|
void (*const init_routine)(void))
|
||||||
{
|
{
|
||||||
if (InterlockedCompareExchange(once_control, 1, 0) == 0) {
|
BOOL pending = FALSE;
|
||||||
|
|
||||||
|
if (InitOnceBeginInitialize(once_control, 0, &pending, NULL) != TRUE)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (pending == TRUE)
|
||||||
init_routine();
|
init_routine();
|
||||||
InterlockedExchange(once_control, 2);
|
|
||||||
} else {
|
|
||||||
while (InterlockedCompareExchange(once_control, 2, 2) != 2)
|
|
||||||
Sleep(1);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Each waiter owns an event. Queue operations and signalling share a lock,
|
return !InitOnceComplete(once_control, 0, NULL);
|
||||||
* so a new waiter cannot consume an earlier waiter's notification. */
|
|
||||||
struct dav1d_cond_waiter {
|
|
||||||
HANDLE event;
|
|
||||||
struct dav1d_cond_waiter *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
int dav1d_pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
|
|
||||||
struct dav1d_cond_waiter waiter, **link;
|
|
||||||
DWORD result;
|
|
||||||
waiter.event = CreateEventW(NULL, FALSE, FALSE, NULL);
|
|
||||||
if (!waiter.event) return 1;
|
|
||||||
EnterCriticalSection(&cond->cs);
|
|
||||||
waiter.next = NULL;
|
|
||||||
for (link = &cond->head; *link; link = &(*link)->next) {}
|
|
||||||
*link = &waiter;
|
|
||||||
pthread_mutex_unlock(mutex);
|
|
||||||
LeaveCriticalSection(&cond->cs);
|
|
||||||
|
|
||||||
result = WaitForSingleObject(waiter.event, INFINITE);
|
|
||||||
EnterCriticalSection(&cond->cs);
|
|
||||||
/* Also unlink on wait failure before the stack record goes away. */
|
|
||||||
for (link = &cond->head; *link; link = &(*link)->next) {
|
|
||||||
if (*link == &waiter) {
|
|
||||||
*link = waiter.next;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CloseHandle(waiter.event);
|
|
||||||
LeaveCriticalSection(&cond->cs);
|
|
||||||
pthread_mutex_lock(mutex);
|
|
||||||
return result != WAIT_OBJECT_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dav1d_pthread_cond_signal(pthread_cond_t *cond) {
|
|
||||||
int result = 0;
|
|
||||||
EnterCriticalSection(&cond->cs);
|
|
||||||
if (cond->head) {
|
|
||||||
if (SetEvent(cond->head->event)) cond->head = cond->head->next;
|
|
||||||
else result = 1;
|
|
||||||
}
|
|
||||||
LeaveCriticalSection(&cond->cs);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dav1d_pthread_cond_broadcast(pthread_cond_t *cond) {
|
|
||||||
int result = 0;
|
|
||||||
EnterCriticalSection(&cond->cs);
|
|
||||||
while (cond->head) {
|
|
||||||
if (!SetEvent(cond->head->event)) {
|
|
||||||
result = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
cond->head = cond->head->next;
|
|
||||||
}
|
|
||||||
LeaveCriticalSection(&cond->cs);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,6 @@ if CONFIG['CC_TYPE'] == 'gcc':
|
||||||
OS_LIBS += ['gomp']
|
OS_LIBS += ['gomp']
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
OS_LIBS += ['dl']
|
OS_LIBS += ['dl']
|
||||||
elif CONFIG['CLANG_CL']:
|
|
||||||
# clang-cl lowers OpenMP pragmas to the LLVM OpenMP runtime.
|
|
||||||
CXXFLAGS += ['-fopenmp']
|
|
||||||
|
|
||||||
DEFINES['BUILDING_SOUNDTOUCH'] = 1
|
DEFINES['BUILDING_SOUNDTOUCH'] = 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,11 @@ if CONFIG['OS_TARGET'] != 'Android':
|
||||||
DEFINES['FAKE_LOG_DEVICE'] = True
|
DEFINES['FAKE_LOG_DEVICE'] = True
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'system/core/liblog/fake_log_device.c',
|
'system/core/liblog/fake_log_device.c',
|
||||||
# io.h conflicts with the access stub in logd_write.c on Windows.
|
|
||||||
'system/core/liblog/logprint.c',
|
|
||||||
]
|
]
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
'system/core/libcutils/strdup16to8.c',
|
'system/core/libcutils/strdup16to8.c',
|
||||||
'system/core/liblog/logd_write.c',
|
'system/core/liblog/logd_write.c',
|
||||||
|
'system/core/liblog/logprint.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
EXPORTS.mp4_demuxer += [
|
EXPORTS.mp4_demuxer += [
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <io.h>
|
|
||||||
#else
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <log/logd.h>
|
#include <log/logd.h>
|
||||||
#include <log/logprint.h>
|
#include <log/logprint.h>
|
||||||
|
|
||||||
|
|
@ -951,11 +945,7 @@ int android_log_printLogLine(
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
#ifdef _WIN32
|
|
||||||
ret = _write(fd, outBuffer, totalLen);
|
|
||||||
#else
|
|
||||||
ret = write(fd, outBuffer, totalLen);
|
ret = write(fd, outBuffer, totalLen);
|
||||||
#endif
|
|
||||||
} while (ret < 0 && errno == EINTR);
|
} while (ret < 0 && errno == EINTR);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
|
||||||
|
|
@ -31,15 +31,6 @@ if CONFIG['INTEL_ARCHITECTURE']:
|
||||||
'inflate_simd.c',
|
'inflate_simd.c',
|
||||||
'x86.c',
|
'x86.c',
|
||||||
]
|
]
|
||||||
# Clang (including clang-cl) and GCC require explicit ISA flags for
|
|
||||||
# intrinsics. MSVC accepts these intrinsics without additional flags.
|
|
||||||
# Keep advanced instructions confined to the runtime-dispatched sources.
|
|
||||||
if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
|
|
||||||
SOURCES['adler32_simd.c'].flags += ['-mssse3']
|
|
||||||
for source in ['crc32_simd.c', 'crc_folding.c']:
|
|
||||||
SOURCES[source].flags += ['-msse4.2', '-mpclmul']
|
|
||||||
for source in ['fill_window_sse.c', 'inffast_chunk.c', 'inflate_simd.c']:
|
|
||||||
SOURCES[source].flags += ['-msse2']
|
|
||||||
else:
|
else:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'simd_stub.c',
|
'simd_stub.c',
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,8 @@ static void _x86_check_features(void)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
static volatile LONG once_control = 0;
|
static volatile int32_t once_control = 0;
|
||||||
static int fake_pthread_once(volatile LONG *once_control,
|
static int fake_pthread_once(volatile int32_t *once_control,
|
||||||
void (*init_routine)(void));
|
void (*init_routine)(void));
|
||||||
|
|
||||||
void x86_check_features(void)
|
void x86_check_features(void)
|
||||||
|
|
@ -75,7 +75,7 @@ void x86_check_features(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copied from "perftools_pthread_once" in tcmalloc */
|
/* Copied from "perftools_pthread_once" in tcmalloc */
|
||||||
static int fake_pthread_once(volatile LONG *once_control,
|
static int fake_pthread_once(volatile int32_t *once_control,
|
||||||
void (*init_routine)(void)) {
|
void (*init_routine)(void)) {
|
||||||
// Try for a fast path first. Note: this should be an acquire semantics read
|
// Try for a fast path first. Note: this should be an acquire semantics read
|
||||||
// It is on x86 and x64, where Windows runs.
|
// It is on x86 and x64, where Windows runs.
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export CLANG=/c/clang/bin
|
||||||
export CC="clang-cl.exe"
|
export CC="clang-cl.exe"
|
||||||
export MT="llvm-mt.exe"
|
export MT="llvm-mt.exe"
|
||||||
export LD="lld-link.exe"
|
export LD="lld-link.exe"
|
||||||
|
export LIB="lib.exe"
|
||||||
|
|
||||||
# Force PATH so UXP thinks only Clang is there
|
# Force PATH so UXP thinks only Clang is there
|
||||||
export PATH="$CLANG:$PATH"
|
export PATH="$CLANG:$PATH"
|
||||||
|
|
@ -23,8 +24,8 @@ mk_add_options MOZ_MAKE_FLAGS="-j6"
|
||||||
ac_add_options --host=x86_64-pc-mingw32
|
ac_add_options --host=x86_64-pc-mingw32
|
||||||
ac_add_options --target=x86_64-pc-mingw32
|
ac_add_options --target=x86_64-pc-mingw32
|
||||||
|
|
||||||
# Build only Dactyloidae
|
# Build only Hydra
|
||||||
ac_add_options --enable-application=browser
|
ac_add_options --enable-application=basilisk
|
||||||
ac_add_options --disable-artifact-builds
|
ac_add_options --disable-artifact-builds
|
||||||
|
|
||||||
# Updater stuffs
|
# Updater stuffs
|
||||||
|
|
@ -42,7 +43,7 @@ ac_add_options --enable-devtools
|
||||||
#ac_add_options --enable-install-strip
|
#ac_add_options --enable-install-strip
|
||||||
ac_add_options --enable-jemalloc
|
ac_add_options --enable-jemalloc
|
||||||
ac_add_options --enable-js-lto
|
ac_add_options --enable-js-lto
|
||||||
ac_add_options --enable-optimize="-O2 -Ob2ity -arch:SSE2 -w0 -w"
|
ac_add_options --enable-optimize="-O2 -Ob2ity -openmp -arch:AVX -w0 -w"
|
||||||
ac_add_options --enable-phoenix-extensions
|
ac_add_options --enable-phoenix-extensions
|
||||||
ac_add_options --enable-release
|
ac_add_options --enable-release
|
||||||
ac_add_options --enable-shared-js
|
ac_add_options --enable-shared-js
|
||||||
|
|
@ -64,7 +65,7 @@ ac_add_options --disable-crashreporter
|
||||||
ac_add_options --disable-eme
|
ac_add_options --disable-eme
|
||||||
ac_add_options --disable-maintenance-service
|
ac_add_options --disable-maintenance-service
|
||||||
ac_add_options --disable-parental-controls
|
ac_add_options --disable-parental-controls
|
||||||
ac_add_options --enable-ctypes
|
ac_add_options --disable-ctypes
|
||||||
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||||
export CROSS_COMPILE=0
|
export CROSS_COMPILE=0
|
||||||
export MOZ_CRASHREPORTER=0
|
export MOZ_CRASHREPORTER=0
|
||||||
|
|
|
||||||
|
|
@ -321,8 +321,8 @@ static PRStatus PR_CALLBACK SocketConnectContinue(
|
||||||
} else {
|
} else {
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
if (fd->secret->overlappedActive) {
|
if (fd->secret->overlappedActive) {
|
||||||
DWORD rvSent;
|
PRInt32 rvSent;
|
||||||
if (GetOverlappedResult((HANDLE)osfd, &fd->secret->ol, &rvSent, FALSE) == FALSE) {
|
if (GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE) == FALSE) {
|
||||||
err = WSAGetLastError();
|
err = WSAGetLastError();
|
||||||
PR_LOG(_pr_io_lm, PR_LOG_MIN,
|
PR_LOG(_pr_io_lm, PR_LOG_MIN,
|
||||||
("SocketConnectContinue GetOverlappedResult failed %d\n", err));
|
("SocketConnectContinue GetOverlappedResult failed %d\n", err));
|
||||||
|
|
@ -353,8 +353,8 @@ static PRStatus PR_CALLBACK SocketConnectContinue(
|
||||||
* To get result we need to use GetOverlappedResult. */
|
* To get result we need to use GetOverlappedResult. */
|
||||||
if (fd->secret->overlappedActive) {
|
if (fd->secret->overlappedActive) {
|
||||||
PR_ASSERT(fd->secret->nonblocking);
|
PR_ASSERT(fd->secret->nonblocking);
|
||||||
DWORD rvSent;
|
PRInt32 rvSent;
|
||||||
if (GetOverlappedResult((HANDLE)osfd, &fd->secret->ol, &rvSent, FALSE) == TRUE) {
|
if (GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE) == TRUE) {
|
||||||
fd->secret->overlappedActive = PR_FALSE;
|
fd->secret->overlappedActive = PR_FALSE;
|
||||||
PR_LOG(_pr_io_lm, PR_LOG_MIN,
|
PR_LOG(_pr_io_lm, PR_LOG_MIN,
|
||||||
("SocketConnectContinue GetOverlappedResult succeeded\n"));
|
("SocketConnectContinue GetOverlappedResult succeeded\n"));
|
||||||
|
|
|
||||||
|
|
@ -769,13 +769,10 @@ PRStatus _PR_WaitWindowsProcess(PRProcess *process,
|
||||||
return PR_FAILURE;
|
return PR_FAILURE;
|
||||||
}
|
}
|
||||||
PR_ASSERT(dwRetVal == WAIT_OBJECT_0);
|
PR_ASSERT(dwRetVal == WAIT_OBJECT_0);
|
||||||
if (exitCode != NULL) {
|
if (exitCode != NULL &&
|
||||||
DWORD dwExitCode;
|
GetExitCodeProcess(process->md.handle, exitCode) == FALSE) {
|
||||||
if (GetExitCodeProcess(process->md.handle, &dwExitCode) == FALSE) {
|
PR_SetError(PR_UNKNOWN_ERROR, GetLastError());
|
||||||
PR_SetError(PR_UNKNOWN_ERROR, GetLastError());
|
return PR_FAILURE;
|
||||||
return PR_FAILURE;
|
|
||||||
}
|
|
||||||
*exitCode = (PRInt32)dwExitCode;
|
|
||||||
}
|
}
|
||||||
CloseHandle(process->md.handle);
|
CloseHandle(process->md.handle);
|
||||||
PR_DELETE(process);
|
PR_DELETE(process);
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, int mode)
|
||||||
PRInt32
|
PRInt32
|
||||||
_PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
|
_PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
|
||||||
{
|
{
|
||||||
DWORD bytes;
|
PRUint32 bytes;
|
||||||
int rv, err;
|
int rv, err;
|
||||||
|
|
||||||
rv = ReadFile((HANDLE)fd->secret->md.osfd,
|
rv = ReadFile((HANDLE)fd->secret->md.osfd,
|
||||||
|
|
@ -295,7 +295,7 @@ PRInt32
|
||||||
_PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
|
_PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
|
||||||
{
|
{
|
||||||
PROsfd f = fd->secret->md.osfd;
|
PROsfd f = fd->secret->md.osfd;
|
||||||
DWORD bytes;
|
PRInt32 bytes;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
rv = WriteFile((HANDLE)f,
|
rv = WriteFile((HANDLE)f,
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Include Winsock 2 before primpl.h brings in windows.h and Winsock 1. */
|
|
||||||
#include <winsock2.h>
|
|
||||||
#include "primpl.h"
|
#include "primpl.h"
|
||||||
|
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
|
|
@ -119,7 +117,7 @@ _MD_CloseSocket(PROsfd osfd)
|
||||||
PRInt32
|
PRInt32
|
||||||
_MD_SocketAvailable(PRFileDesc *fd)
|
_MD_SocketAvailable(PRFileDesc *fd)
|
||||||
{
|
{
|
||||||
u_long result;
|
PRInt32 result;
|
||||||
|
|
||||||
if (ioctlsocket(fd->secret->md.osfd, FIONREAD, &result) < 0) {
|
if (ioctlsocket(fd->secret->md.osfd, FIONREAD, &result) < 0) {
|
||||||
PR_SetError(PR_BAD_DESCRIPTOR_ERROR, WSAGetLastError());
|
PR_SetError(PR_BAD_DESCRIPTOR_ERROR, WSAGetLastError());
|
||||||
|
|
@ -365,7 +363,7 @@ static PRStatus PR_CALLBACK _pr_set_connectex(void)
|
||||||
{
|
{
|
||||||
_pr_win_connectex = NULL;
|
_pr_win_connectex = NULL;
|
||||||
SOCKET sock;
|
SOCKET sock;
|
||||||
DWORD dwBytes;
|
PRInt32 dwBytes;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Dummy socket needed for WSAIoctl */
|
/* Dummy socket needed for WSAIoctl */
|
||||||
|
|
@ -447,7 +445,7 @@ _PR_MD_TCPSENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
|
||||||
memset(&fd->secret->ol, 0, sizeof(fd->secret->ol));
|
memset(&fd->secret->ol, 0, sizeof(fd->secret->ol));
|
||||||
/* ConnectEx return TRUE on a success and FALSE on an error. */
|
/* ConnectEx return TRUE on a success and FALSE on an error. */
|
||||||
if (_pr_win_connectex( (SOCKET)osfd, (struct sockaddr *) addr,
|
if (_pr_win_connectex( (SOCKET)osfd, (struct sockaddr *) addr,
|
||||||
addrlen, (PVOID)buf, amount,
|
addrlen, buf, amount,
|
||||||
&rvSent, &fd->secret->ol) == TRUE) {
|
&rvSent, &fd->secret->ol) == TRUE) {
|
||||||
/* When ConnectEx is used, all previously set socket options and
|
/* When ConnectEx is used, all previously set socket options and
|
||||||
* property are not enabled and to enable them
|
* property are not enabled and to enable them
|
||||||
|
|
@ -496,7 +494,7 @@ _PR_MD_TCPSENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
|
||||||
if ( rv < 0 ) {
|
if ( rv < 0 ) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
rv = GetOverlappedResult((HANDLE)osfd, &fd->secret->ol, &rvSent, FALSE);
|
rv = GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE);
|
||||||
if ( rv == TRUE ) {
|
if ( rv == TRUE ) {
|
||||||
return rvSent;
|
return rvSent;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -4773,22 +4773,11 @@ if test "$MOZ_TREE_CAIRO"; then
|
||||||
|
|
||||||
if test "$COMPILE_ENVIRONMENT"; then
|
if test "$COMPILE_ENVIRONMENT"; then
|
||||||
|
|
||||||
dnl SDK include paths can change between build shells. Do not cache
|
MOZ_CHECK_HEADER(d3d9.h, MOZ_ENABLE_D3D9_LAYER=1)
|
||||||
dnl these checks, or a stale failure disables required D3D exports.
|
|
||||||
unset ac_cv_header_d3d9_h ac_cv_header_d3d10_h
|
|
||||||
AC_MSG_CHECKING([for d3d9.h])
|
|
||||||
AC_TRY_COMPILE([#include <d3d9.h>], ,
|
|
||||||
[MOZ_ENABLE_D3D9_LAYER=1
|
|
||||||
AC_MSG_RESULT(yes)],
|
|
||||||
[AC_MSG_RESULT(no)])
|
|
||||||
|
|
||||||
dnl D3D10 Layers depend on D2D Surfaces.
|
dnl D3D10 Layers depend on D2D Surfaces.
|
||||||
if test -n "$WIN32_D2D_SURFACE_FEATURE"; then
|
if test -n "$WIN32_D2D_SURFACE_FEATURE"; then
|
||||||
AC_MSG_CHECKING([for d3d10.h])
|
MOZ_CHECK_HEADER(d3d10.h, MOZ_ENABLE_D3D10_LAYER=1)
|
||||||
AC_TRY_COMPILE([#include <d3d10.h>], ,
|
|
||||||
[MOZ_ENABLE_D3D10_LAYER=1
|
|
||||||
AC_MSG_RESULT(yes)],
|
|
||||||
[AC_MSG_RESULT(no)])
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue