|
From 234bd6771c6c3b66ca18084aea6b2fb8acb92228 Mon Sep 17 00:00:00 2001 |
|
From: Kacper Kasper <[email protected]> |
|
Date: Sat, 22 Jun 2019 05:04:18 +0200 |
|
Subject: [PATCH 2/5] More fixes |
|
|
|
--- |
|
src/3rdparty/chromium/base/BUILD.gn | 12 ++ |
|
.../chromium/base/base_paths_haiku.cc | 21 +++ |
|
src/3rdparty/chromium/base/base_paths_haiku.h | 26 +++ |
|
.../chromium/base/debug/stack_trace.cc | 2 +- |
|
.../chromium/base/debug/stack_trace_posix.cc | 12 +- |
|
src/3rdparty/chromium/base/export_template.h | 2 +- |
|
src/3rdparty/chromium/base/logging.cc | 2 +- |
|
src/3rdparty/chromium/base/path_service.cc | 14 +- |
|
.../base/process/process_handle_haiku.cc | 22 +++ |
|
.../base/process/process_iterator_haiku.cc | 26 +++ |
|
.../base/process/process_metrics_haiku.cc | 32 ++++ |
|
src/3rdparty/chromium/base/sys_info_haiku.cc | 39 ++++ |
|
src/3rdparty/chromium/base/sys_info_posix.cc | 8 +- |
|
.../base/threading/platform_thread_haiku.cc | 55 ++++++ |
|
.../base/threading/platform_thread_posix.cc | 4 +- |
|
.../url_formatter/idn_spoof_checker.cc | 2 +- |
|
.../variations/client_filterable_state.cc | 2 +- |
|
.../content/app/content_main_runner_impl.cc | 4 + |
|
src/3rdparty/chromium/content/child/BUILD.gn | 2 +- |
|
.../content/child/blink_platform_impl.h | 2 +- |
|
.../chromium/ipc/ipc_message_utils.cc | 2 +- |
|
src/3rdparty/chromium/ipc/ipc_message_utils.h | 2 +- |
|
.../public/cpp/manifest_parsing_util.cc | 5 +- |
|
.../chromium/services/catalog/store.cc | 2 + |
|
.../chromium/services/catalog/store.h | 1 + |
|
.../chromium/skia/ext/platform_canvas.h | 2 +- |
|
.../blink/renderer/platform/wtf/stack_util.cc | 19 +- |
|
.../blink/renderer/platform/wtf/stack_util.h | 2 +- |
|
.../renderer/platform/wtf/wtf_thread_data.cc | 2 +- |
|
.../renderer/platform/wtf/wtf_thread_data.h | 4 +- |
|
.../third_party/khronos/EGL/eglplatform.h | 7 + |
|
.../skia/include/core/SkPreConfig.h | 3 +- |
|
.../skia/src/gpu/GrAutoLocaleSetter.h | 2 +- |
|
.../chromium/third_party/webrtc/BUILD.gn | 5 +- |
|
.../third_party/webrtc/rtc_base/BUILD.gn | 4 + |
|
.../third_party/webrtc/rtc_base/ipaddress.cc | 15 +- |
|
.../third_party/webrtc/rtc_base/network.cc | 3 + |
|
.../webrtc/rtc_base/physicalsocketserver.cc | 4 +- |
|
.../webrtc/rtc_base/platform_thread_types.cc | 6 + |
|
.../chromium/third_party/yasm/BUILD.gn | 3 + |
|
.../yasm/source/config/haiku/config.h | 173 +++++++++++++++++ |
|
.../yasm/source/config/haiku/libyasm-stdint.h | 9 + |
|
.../chromium/tools/grit/grit/node/base.py | 4 +- |
|
.../chromium/ui/gfx/native_widget_types.h | 8 + |
|
src/3rdparty/chromium/ui/gl/BUILD.gn | 2 +- |
|
src/3rdparty/chromium/ui/gl/features.gni | 2 +- |
|
src/3rdparty/chromium/ui/gl/init/BUILD.gn | 9 + |
|
.../chromium/ui/gl/init/gl_factory_haiku.cc | 157 ++++++++++++++++ |
|
.../ui/gl/init/gl_initializer_haiku.cc | 174 ++++++++++++++++++ |
|
src/3rdparty/chromium/v8/include/v8config.h | 3 + |
|
.../chromium/v8/src/base/export-template.h | 2 + |
|
.../v8/src/base/platform/platform-posix.cc | 9 +- |
|
.../chromium/v8/src/interface-descriptors.h | 12 +- |
|
.../chromium/v8/src/libsampler/sampler.cc | 22 ++- |
|
54 files changed, 913 insertions(+), 55 deletions(-) |
|
create mode 100644 src/3rdparty/chromium/base/base_paths_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/base/base_paths_haiku.h |
|
create mode 100644 src/3rdparty/chromium/base/process/process_handle_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/base/process/process_iterator_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/base/process/process_metrics_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/base/sys_info_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/base/threading/platform_thread_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/third_party/yasm/source/config/haiku/config.h |
|
create mode 100644 src/3rdparty/chromium/third_party/yasm/source/config/haiku/libyasm-stdint.h |
|
create mode 100644 src/3rdparty/chromium/ui/gl/init/gl_factory_haiku.cc |
|
create mode 100644 src/3rdparty/chromium/ui/gl/init/gl_initializer_haiku.cc |
|
|
|
diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn |
|
index 010384706..bbfa23ed7 100644 |
|
--- a/src/3rdparty/chromium/base/BUILD.gn |
|
+++ b/src/3rdparty/chromium/base/BUILD.gn |
|
@@ -1456,6 +1456,18 @@ jumbo_component("base") { |
|
} |
|
|
|
if (is_haiku) { |
|
+ sources -= [ "process/memory.cc" ] |
|
+ sources += [ |
|
+ "base_paths_haiku.cc", |
|
+ "base_paths_haiku.h", |
|
+ "process/memory_stubs.cc", |
|
+ "process/process_handle_haiku.cc", |
|
+ "process/process_iterator_haiku.cc", |
|
+ "process/process_metrics_haiku.cc", |
|
+ "threading/platform_thread_haiku.cc", |
|
+ "sys_info_haiku.cc" |
|
+ ] |
|
+ |
|
defines += [ "_BSD_SOURCE", "__USE_XOPEN2K8" ] |
|
} |
|
|
|
diff --git a/src/3rdparty/chromium/base/base_paths_haiku.cc b/src/3rdparty/chromium/base/base_paths_haiku.cc |
|
new file mode 100644 |
|
index 000000000..ca8aa43bb |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/base_paths_haiku.cc |
|
@@ -0,0 +1,21 @@ |
|
+// Copyright 2017 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "base/base_paths.h" |
|
+ |
|
+#include <stdlib.h> |
|
+ |
|
+#include "base/base_paths_haiku.h" |
|
+#include "base/command_line.h" |
|
+#include "base/files/file_util.h" |
|
+#include "base/path_service.h" |
|
+#include "base/process/process.h" |
|
+ |
|
+namespace base { |
|
+ |
|
+bool PathProviderHaiku(int key, FilePath* result) { |
|
+ return false; |
|
+} |
|
+ |
|
+} // namespace base |
|
diff --git a/src/3rdparty/chromium/base/base_paths_haiku.h b/src/3rdparty/chromium/base/base_paths_haiku.h |
|
new file mode 100644 |
|
index 000000000..d30b52aaf |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/base_paths_haiku.h |
|
@@ -0,0 +1,26 @@ |
|
+// Copyright (c) 2018 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#ifndef BASE_BASE_PATHS_HAIKU_H_ |
|
+#define BASE_BASE_PATHS_HAIKU_H_ |
|
+ |
|
+#include "base/base_export.h" |
|
+#include "base/files/file_path.h" |
|
+ |
|
+namespace base { |
|
+ |
|
+// These can be used with the PathService to access various special |
|
+// directories and files. |
|
+enum { |
|
+ PATH_HAIKU_START = 1200, |
|
+ |
|
+ // Path to the directory which contains application user data. |
|
+ DIR_APP_DATA, |
|
+ |
|
+ PATH_HAIKU_END, |
|
+}; |
|
+ |
|
+} // namespace base |
|
+ |
|
+#endif // BASE_BASE_PATHS_HAIKU_H_ |
|
diff --git a/src/3rdparty/chromium/base/debug/stack_trace.cc b/src/3rdparty/chromium/base/debug/stack_trace.cc |
|
index 771512176..9bc06037a 100644 |
|
--- a/src/3rdparty/chromium/base/debug/stack_trace.cc |
|
+++ b/src/3rdparty/chromium/base/debug/stack_trace.cc |
|
@@ -214,7 +214,7 @@ const void *const *StackTrace::Addresses(size_t* count) const { |
|
|
|
std::string StackTrace::ToString() const { |
|
std::stringstream stream; |
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) |
|
OutputToStream(&stream); |
|
#endif |
|
return stream.str(); |
|
diff --git a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc |
|
index 54a22c0cc..bc657e98a 100644 |
|
--- a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc |
|
+++ b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc |
|
@@ -27,7 +27,7 @@ |
|
#if !defined(USE_SYMBOLIZE) |
|
#include <cxxabi.h> |
|
#endif |
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) && !defined(OS_HAIKU) |
|
#include <execinfo.h> |
|
#endif |
|
|
|
@@ -86,7 +86,7 @@ void DemangleSymbols(std::string* text) { |
|
// Note: code in this function is NOT async-signal safe (std::string uses |
|
// malloc internally). |
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) |
|
std::string::size_type search_from = 0; |
|
while (search_from < text->size()) { |
|
// Look for the start of a mangled symbol, from search_from. |
|
@@ -133,7 +133,7 @@ class BacktraceOutputHandler { |
|
virtual ~BacktraceOutputHandler() = default; |
|
}; |
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) |
|
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { |
|
// This should be more than enough to store a 64-bit number in hex: |
|
// 16 hex digits + 1 for null-terminator. |
|
@@ -806,7 +806,7 @@ StackTrace::StackTrace(size_t count) { |
|
// NOTE: This code MUST be async-signal safe (it's used by in-process |
|
// stack dumping signal handler). NO malloc or stdio is allowed here. |
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) |
|
count = std::min(arraysize(trace_), count); |
|
|
|
// Though the backtrace API man page does not list any possible negative |
|
@@ -821,13 +821,13 @@ void StackTrace::Print() const { |
|
// NOTE: This code MUST be async-signal safe (it's used by in-process |
|
// stack dumping signal handler). NO malloc or stdio is allowed here. |
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) |
|
PrintBacktraceOutputHandler handler; |
|
ProcessBacktrace(trace_, count_, &handler); |
|
#endif |
|
} |
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX) |
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_HAIKU) |
|
void StackTrace::OutputToStream(std::ostream* os) const { |
|
StreamBacktraceOutputHandler handler(os); |
|
ProcessBacktrace(trace_, count_, &handler); |
|
diff --git a/src/3rdparty/chromium/base/export_template.h b/src/3rdparty/chromium/base/export_template.h |
|
index aac8b7c7f..51807fe16 100644 |
|
--- a/src/3rdparty/chromium/base/export_template.h |
|
+++ b/src/3rdparty/chromium/base/export_template.h |
|
@@ -153,7 +153,7 @@ |
|
|
|
EXPORT_TEMPLATE_TEST(DEFAULT, ); |
|
EXPORT_TEMPLATE_TEST(DEFAULT, __attribute__((visibility("default")))); |
|
-EXPORT_TEMPLATE_TEST(MSVC_HACK, __declspec(dllexport)); |
|
+//EXPORT_TEMPLATE_TEST(MSVC_HACK, __declspec(dllexport)); |
|
EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); |
|
|
|
#undef EXPORT_TEMPLATE_TEST |
|
diff --git a/src/3rdparty/chromium/base/logging.cc b/src/3rdparty/chromium/base/logging.cc |
|
index 7752cce58..d2234fd99 100644 |
|
--- a/src/3rdparty/chromium/base/logging.cc |
|
+++ b/src/3rdparty/chromium/base/logging.cc |
|
@@ -586,7 +586,7 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity, |
|
LogMessage::~LogMessage() { |
|
size_t stack_start = stream_.tellp(); |
|
#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \ |
|
- !defined(OS_AIX) |
|
+ !defined(OS_AIX) && !defined(OS_HAIKU) |
|
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { |
|
// Include a stack trace on a fatal, unless a debugger is attached. |
|
base::debug::StackTrace trace; |
|
diff --git a/src/3rdparty/chromium/base/path_service.cc b/src/3rdparty/chromium/base/path_service.cc |
|
index 6ac501eaf..3c3350d3a 100644 |
|
--- a/src/3rdparty/chromium/base/path_service.cc |
|
+++ b/src/3rdparty/chromium/base/path_service.cc |
|
@@ -30,6 +30,8 @@ bool PathProviderMac(int key, FilePath* result); |
|
bool PathProviderAndroid(int key, FilePath* result); |
|
#elif defined(OS_FUCHSIA) |
|
bool PathProviderFuchsia(int key, FilePath* result); |
|
+#elif defined(OS_HAIKU) |
|
+bool PathProviderHaiku(int key, FilePath* result); |
|
#elif defined(OS_POSIX) |
|
// PathProviderPosix is the default path provider on POSIX OSes other than |
|
// Mac and Android. |
|
@@ -102,8 +104,16 @@ Provider base_provider_fuchsia = {PathProviderFuchsia, &base_provider, |
|
true}; |
|
#endif |
|
|
|
+#if defined(OS_HAIKU) |
|
+Provider base_provider_haiku = {PathProviderHaiku, &base_provider, |
|
+#ifndef NDEBUG |
|
+ 0, 0, |
|
+#endif |
|
+ true}; |
|
+#endif |
|
+ |
|
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ |
|
- !defined(OS_FUCHSIA) |
|
+ !defined(OS_FUCHSIA) && !defined(OS_HAIKU) |
|
Provider base_provider_posix = { |
|
PathProviderPosix, |
|
&base_provider, |
|
@@ -132,6 +142,8 @@ struct PathData { |
|
providers = &base_provider_android; |
|
#elif defined(OS_FUCHSIA) |
|
providers = &base_provider_fuchsia; |
|
+#elif defined(OS_HAIKU) |
|
+ providers = &base_provider_haiku; |
|
#elif defined(OS_POSIX) |
|
providers = &base_provider_posix; |
|
#endif |
|
diff --git a/src/3rdparty/chromium/base/process/process_handle_haiku.cc b/src/3rdparty/chromium/base/process/process_handle_haiku.cc |
|
new file mode 100644 |
|
index 000000000..35241477c |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/process/process_handle_haiku.cc |
|
@@ -0,0 +1,22 @@ |
|
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "base/logging.h" |
|
+#include "base/process/process_handle.h" |
|
+ |
|
+#include "base/files/file_util.h" |
|
+ |
|
+namespace base { |
|
+ |
|
+ProcessId GetParentProcessId(ProcessHandle process) { |
|
+ NOTIMPLEMENTED(); |
|
+ return -1; |
|
+} |
|
+ |
|
+FilePath GetProcessExecutablePath(ProcessHandle process) { |
|
+ NOTIMPLEMENTED(); |
|
+ return FilePath(); |
|
+} |
|
+ |
|
+} // namespace base |
|
diff --git a/src/3rdparty/chromium/base/process/process_iterator_haiku.cc b/src/3rdparty/chromium/base/process/process_iterator_haiku.cc |
|
new file mode 100644 |
|
index 000000000..6d411bad7 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/process/process_iterator_haiku.cc |
|
@@ -0,0 +1,26 @@ |
|
+// Copyright 2017 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "base/process/process_iterator.h" |
|
+ |
|
+namespace base { |
|
+ |
|
+ProcessIterator::ProcessIterator(const ProcessFilter* filter) { |
|
+ // TODO(fuchsia): There's no Fuchsia API to iterate processes currently. |
|
+ NOTREACHED(); |
|
+} |
|
+ |
|
+ProcessIterator::~ProcessIterator() {} |
|
+ |
|
+bool ProcessIterator::CheckForNextProcess() { |
|
+ // TODO(fuchsia): There's no Fuchsia API to iterate processes currently. |
|
+ return false; |
|
+} |
|
+ |
|
+bool NamedProcessIterator::IncludeEntry() { |
|
+ // TODO(fuchsia): There's no Fuchsia API to iterate processes currently. |
|
+ return false; |
|
+} |
|
+ |
|
+} // namespace base |
|
diff --git a/src/3rdparty/chromium/base/process/process_metrics_haiku.cc b/src/3rdparty/chromium/base/process/process_metrics_haiku.cc |
|
new file mode 100644 |
|
index 000000000..e2e782969 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/process/process_metrics_haiku.cc |
|
@@ -0,0 +1,32 @@ |
|
+// Copyright 2017 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "base/process/process_metrics.h" |
|
+ |
|
+namespace base { |
|
+ |
|
+size_t GetSystemCommitCharge() { |
|
+ // Not available, doesn't seem likely that it will be (for the whole system). |
|
+ NOTIMPLEMENTED(); |
|
+ return 0; |
|
+} |
|
+ |
|
+// static |
|
+std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics( |
|
+ ProcessHandle process) { |
|
+ NOTIMPLEMENTED(); // TODO(fuchsia): https://crbug.com/706592. |
|
+ return nullptr; |
|
+} |
|
+ |
|
+TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { |
|
+ NOTIMPLEMENTED(); // TODO(fuchsia): https://crbug.com/706592. |
|
+ return TimeDelta(); |
|
+} |
|
+ |
|
+bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { |
|
+ NOTIMPLEMENTED(); // TODO(fuchsia): https://crbug.com/706592. |
|
+ return false; |
|
+} |
|
+ |
|
+} // namespace base |
|
diff --git a/src/3rdparty/chromium/base/sys_info_haiku.cc b/src/3rdparty/chromium/base/sys_info_haiku.cc |
|
new file mode 100644 |
|
index 000000000..e38fda171 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/sys_info_haiku.cc |
|
@@ -0,0 +1,39 @@ |
|
+// Copyright 2018 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "base/sys_info.h" |
|
+ |
|
+#include "base/logging.h" |
|
+ |
|
+#include <kernel/OS.h> |
|
+ |
|
+namespace base { |
|
+ |
|
+// static |
|
+int64_t SysInfo::AmountOfPhysicalMemoryImpl() { |
|
+ system_info systemInfo; |
|
+ get_system_info(&systemInfo); |
|
+ return static_cast<int64_t>(systemInfo.max_pages * (B_PAGE_SIZE / 1048576.0f) + 0.5f); |
|
+} |
|
+ |
|
+// static |
|
+int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { |
|
+ // TODO(fuchsia): https://crbug.com/706592 This is not exposed. |
|
+ NOTREACHED(); |
|
+ return 0; |
|
+} |
|
+ |
|
+// static |
|
+int SysInfo::NumberOfProcessors() { |
|
+ system_info systemInfo; |
|
+ get_system_info(&systemInfo); |
|
+ return static_cast<int>(systemInfo.cpu_count); |
|
+} |
|
+ |
|
+// static |
|
+int64_t SysInfo::AmountOfVirtualMemory() { |
|
+ return 0; |
|
+} |
|
+ |
|
+} // namespace base |
|
diff --git a/src/3rdparty/chromium/base/sys_info_posix.cc b/src/3rdparty/chromium/base/sys_info_posix.cc |
|
index 464c11a5e..7ca4591d0 100644 |
|
--- a/src/3rdparty/chromium/base/sys_info_posix.cc |
|
+++ b/src/3rdparty/chromium/base/sys_info_posix.cc |
|
@@ -38,7 +38,7 @@ |
|
|
|
namespace { |
|
|
|
-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) |
|
+#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) && !defined(OS_HAIKU) |
|
int NumberOfProcessors() { |
|
// sysconf returns the number of "logical" (not "physical") processors on both |
|
// Mac and Linux. So we get the number of max available "logical" processors. |
|
@@ -67,7 +67,7 @@ base::LazyInstance< |
|
g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; |
|
#endif // !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) |
|
|
|
-#if !defined(OS_FUCHSIA) |
|
+#if !defined(OS_FUCHSIA) && !defined(OS_HAIKU) |
|
int64_t AmountOfVirtualMemory() { |
|
struct rlimit limit; |
|
int result = getrlimit(RLIMIT_DATA, &limit); |
|
@@ -133,13 +133,13 @@ bool GetDiskSpaceInfo(const base::FilePath& path, |
|
|
|
namespace base { |
|
|
|
-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) |
|
+#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) && !defined(OS_HAIKU) |
|
int SysInfo::NumberOfProcessors() { |
|
return g_lazy_number_of_processors.Get().value(); |
|
} |
|
#endif |
|
|
|
-#if !defined(OS_FUCHSIA) |
|
+#if !defined(OS_FUCHSIA) && !defined(OS_HAIKU) |
|
// static |
|
int64_t SysInfo::AmountOfVirtualMemory() { |
|
return g_lazy_virtual_memory.Get().value(); |
|
diff --git a/src/3rdparty/chromium/base/threading/platform_thread_haiku.cc b/src/3rdparty/chromium/base/threading/platform_thread_haiku.cc |
|
new file mode 100644 |
|
index 000000000..fb4613851 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/base/threading/platform_thread_haiku.cc |
|
@@ -0,0 +1,55 @@ |
|
+// Copyright 2018 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "base/threading/platform_thread.h" |
|
+ |
|
+#include <pthread.h> |
|
+#include <sched.h> |
|
+ |
|
+#include "base/threading/platform_thread_internal_posix.h" |
|
+#include "base/threading/thread_id_name_manager.h" |
|
+ |
|
+namespace base { |
|
+ |
|
+namespace internal { |
|
+ |
|
+const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = { |
|
+ {ThreadPriority::BACKGROUND, 10}, |
|
+ {ThreadPriority::NORMAL, 0}, |
|
+ {ThreadPriority::DISPLAY, -8}, |
|
+ {ThreadPriority::REALTIME_AUDIO, -10}, |
|
+}; |
|
+ |
|
+bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) { |
|
+ sched_param prio = {0}; |
|
+ prio.sched_priority = ThreadPriorityToNiceValue(priority); |
|
+ return pthread_setschedparam(pthread_self(), SCHED_OTHER, &prio) == 0; |
|
+} |
|
+ |
|
+bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) { |
|
+ sched_param prio = {0}; |
|
+ int policy; |
|
+ if (pthread_getschedparam(pthread_self(), &policy, &prio) != 0) { |
|
+ return false; |
|
+ } |
|
+ *priority = NiceValueToThreadPriority(prio.sched_priority); |
|
+ return true; |
|
+} |
|
+ |
|
+} // namespace internal |
|
+ |
|
+void InitThreading() {} |
|
+ |
|
+void TerminateOnThread() {} |
|
+ |
|
+size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { |
|
+ return 0; |
|
+} |
|
+ |
|
+// static |
|
+void PlatformThread::SetName(const std::string& name) { |
|
+ |
|
+} |
|
+ |
|
+} // namespace base |
|
diff --git a/src/3rdparty/chromium/base/threading/platform_thread_posix.cc b/src/3rdparty/chromium/base/threading/platform_thread_posix.cc |
|
index 2466b784d..802c40439 100644 |
|
--- a/src/3rdparty/chromium/base/threading/platform_thread_posix.cc |
|
+++ b/src/3rdparty/chromium/base/threading/platform_thread_posix.cc |
|
@@ -253,7 +253,7 @@ bool PlatformThread::CanIncreaseCurrentThreadPriority() { |
|
|
|
// static |
|
void PlatformThread::SetCurrentThreadPriority(ThreadPriority priority) { |
|
-#if defined(OS_NACL) |
|
+#if defined(OS_NACL) || defined(OS_HAIKU) |
|
NOTIMPLEMENTED(); |
|
#else |
|
if (internal::SetCurrentThreadPriorityForPlatform(priority)) |
|
@@ -275,7 +275,7 @@ void PlatformThread::SetCurrentThreadPriority(ThreadPriority priority) { |
|
|
|
// static |
|
ThreadPriority PlatformThread::GetCurrentThreadPriority() { |
|
-#if defined(OS_NACL) |
|
+#if defined(OS_NACL) || defined(OS_HAIKU) |
|
NOTIMPLEMENTED(); |
|
return ThreadPriority::NORMAL; |
|
#else |
|
diff --git a/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc b/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc |
|
index bf6d5c788..09b51cf12 100644 |
|
--- a/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc |
|
+++ b/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc |
|
@@ -396,7 +396,7 @@ bool IDNSpoofChecker::SimilarToTopDomains(base::StringPiece16 hostname) { |
|
if ((u04cf_pos = host.indexOf(0x4CF)) != -1) { |
|
icu::UnicodeString host_alt(host); |
|
size_t length = host_alt.length(); |
|
- char16_t* buffer = host_alt.getBuffer(-1); |
|
+ char16_t* buffer = reinterpret_cast<char16_t*>(host_alt.getBuffer(-1)); |
|
for (char16_t* uc = buffer + u04cf_pos ; uc < buffer + length; ++uc) { |
|
if (*uc == 0x4CF) |
|
*uc = 0x6C; // Lowercase L |
|
diff --git a/src/3rdparty/chromium/components/variations/client_filterable_state.cc b/src/3rdparty/chromium/components/variations/client_filterable_state.cc |
|
index 6fda4f446..6f7826312 100644 |
|
--- a/src/3rdparty/chromium/components/variations/client_filterable_state.cc |
|
+++ b/src/3rdparty/chromium/components/variations/client_filterable_state.cc |
|
@@ -22,7 +22,7 @@ Study::Platform ClientFilterableState::GetCurrentPlatform() { |
|
return Study::PLATFORM_ANDROID; |
|
#elif defined(OS_FUCHSIA) |
|
return Study::PLATFORM_FUCHSIA; |
|
-#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
+#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HAIKU) |
|
// Default BSD and SOLARIS to Linux to not break those builds, although these |
|
// platforms are not officially supported by Chrome. |
|
return Study::PLATFORM_LINUX; |
|
diff --git a/src/3rdparty/chromium/content/app/content_main_runner_impl.cc b/src/3rdparty/chromium/content/app/content_main_runner_impl.cc |
|
index 090b6bbd1..9d040c85d 100644 |
|
--- a/src/3rdparty/chromium/content/app/content_main_runner_impl.cc |
|
+++ b/src/3rdparty/chromium/content/app/content_main_runner_impl.cc |
|
@@ -519,7 +519,9 @@ int RunZygote(ContentMainDelegate* delegate) { |
|
|
|
std::vector<std::unique_ptr<service_manager::ZygoteForkDelegate>> |
|
zygote_fork_delegates; |
|
+#if defined(OS_LINUX) |
|
delegate->ZygoteStarting(&zygote_fork_delegates); |
|
+#endif |
|
media::InitializeMediaLibrary(); |
|
|
|
#if defined(OS_LINUX) |
|
@@ -531,7 +533,9 @@ int RunZygote(ContentMainDelegate* delegate) { |
|
return 1; |
|
} |
|
|
|
+#if defined(OS_LINUX) |
|
delegate->ZygoteForked(); |
|
+#endif |
|
|
|
// Zygote::HandleForkRequest may have reallocated the command |
|
// line so update it here with the new version. |
|
diff --git a/src/3rdparty/chromium/content/child/BUILD.gn b/src/3rdparty/chromium/content/child/BUILD.gn |
|
index 1f8971c0e..40eb1966e 100644 |
|
--- a/src/3rdparty/chromium/content/child/BUILD.gn |
|
+++ b/src/3rdparty/chromium/content/child/BUILD.gn |
|
@@ -133,7 +133,7 @@ target(link_target_type, "child") { |
|
"//v8", |
|
] |
|
|
|
- if (!use_default_render_theme) { |
|
+ if (!use_default_render_theme && !is_haiku) { |
|
sources -= [ |
|
"webthemeengine_impl_default.cc", |
|
"webthemeengine_impl_default.h", |
|
diff --git a/src/3rdparty/chromium/content/child/blink_platform_impl.h b/src/3rdparty/chromium/content/child/blink_platform_impl.h |
|
index 673290032..994df1288 100644 |
|
--- a/src/3rdparty/chromium/content/child/blink_platform_impl.h |
|
+++ b/src/3rdparty/chromium/content/child/blink_platform_impl.h |
|
@@ -23,7 +23,7 @@ |
|
#include "third_party/blink/public/public_buildflags.h" |
|
#include "ui/base/layout.h" |
|
|
|
-#if BUILDFLAG(USE_DEFAULT_RENDER_THEME) |
|
+#if BUILDFLAG(USE_DEFAULT_RENDER_THEME) || defined(OS_HAIKU) |
|
#include "content/child/webthemeengine_impl_default.h" |
|
#elif defined(OS_WIN) |
|
#include "content/child/webthemeengine_impl_win.h" |
|
diff --git a/src/3rdparty/chromium/ipc/ipc_message_utils.cc b/src/3rdparty/chromium/ipc/ipc_message_utils.cc |
|
index 293c941a5..5c8acd1f5 100644 |
|
--- a/src/3rdparty/chromium/ipc/ipc_message_utils.cc |
|
+++ b/src/3rdparty/chromium/ipc/ipc_message_utils.cc |
|
@@ -349,7 +349,7 @@ void ParamTraits<unsigned int>::Log(const param_type& p, std::string* l) { |
|
} |
|
|
|
#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FUCHSIA) || \ |
|
- (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) |
|
+ defined(OS_HAIKU) || (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) |
|
void ParamTraits<long>::Log(const param_type& p, std::string* l) { |
|
l->append(base::NumberToString(p)); |
|
} |
|
diff --git a/src/3rdparty/chromium/ipc/ipc_message_utils.h b/src/3rdparty/chromium/ipc/ipc_message_utils.h |
|
index 00a164a43..4db73d139 100644 |
|
--- a/src/3rdparty/chromium/ipc/ipc_message_utils.h |
|
+++ b/src/3rdparty/chromium/ipc/ipc_message_utils.h |
|
@@ -204,7 +204,7 @@ struct ParamTraits<unsigned int> { |
|
// Since we want to support Android 32<>64 bit IPC, as long as we don't have |
|
// these traits for 32 bit ARM then that'll catch any errors. |
|
#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FUCHSIA) || \ |
|
- (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) |
|
+ defined(OS_HAIKU) || (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) |
|
template <> |
|
struct ParamTraits<long> { |
|
typedef long param_type; |
|
diff --git a/src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc b/src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc |
|
index 4a19ec6fb..83f72d654 100644 |
|
--- a/src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc |
|
+++ b/src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc |
|
@@ -17,7 +17,8 @@ bool IsValidPlatformName(const std::string& name) { |
|
name == Store::kRequiredFilesKey_PlatformValue_Linux || |
|
name == Store::kRequiredFilesKey_PlatformValue_MacOSX || |
|
name == Store::kRequiredFilesKey_PlatformValue_Android || |
|
- name == Store::kRequiredFilesKey_PlatformValue_Fuchsia; |
|
+ name == Store::kRequiredFilesKey_PlatformValue_Fuchsia || |
|
+ name == Store::kRequiredFilesKey_PlatformValue_Haiku; |
|
} |
|
|
|
bool IsCurrentPlatform(const std::string& name) { |
|
@@ -31,6 +32,8 @@ bool IsCurrentPlatform(const std::string& name) { |
|
return name == Store::kRequiredFilesKey_PlatformValue_Android; |
|
#elif defined(OS_FUCHSIA) |
|
return name == Store::kRequiredFilesKey_PlatformValue_Fuchsia; |
|
+#elif defined(OS_HAIKU) |
|
+ return name == Store::kRequiredFilesKey_PlatformValue_Haiku; |
|
#else |
|
#error This architecture is not supported. |
|
#endif |
|
diff --git a/src/3rdparty/chromium/services/catalog/store.cc b/src/3rdparty/chromium/services/catalog/store.cc |
|
index f59e6d8fb..7e8a734c9 100644 |
|
--- a/src/3rdparty/chromium/services/catalog/store.cc |
|
+++ b/src/3rdparty/chromium/services/catalog/store.cc |
|
@@ -36,5 +36,7 @@ const char Store::kRequiredFilesKey_PlatformValue_MacOSX[] = "macosx"; |
|
const char Store::kRequiredFilesKey_PlatformValue_Android[] = "android"; |
|
// static |
|
const char Store::kRequiredFilesKey_PlatformValue_Fuchsia[] = "fuchsia"; |
|
+// static |
|
+const char Store::kRequiredFilesKey_PlatformValue_Haiku[] = "haiku"; |
|
|
|
} // namespace catalog |
|
diff --git a/src/3rdparty/chromium/services/catalog/store.h b/src/3rdparty/chromium/services/catalog/store.h |
|
index 831ee9fb9..d4cc841b9 100644 |
|
--- a/src/3rdparty/chromium/services/catalog/store.h |
|
+++ b/src/3rdparty/chromium/services/catalog/store.h |
|
@@ -36,6 +36,7 @@ class Store { |
|
static const char kRequiredFilesKey_PlatformValue_MacOSX[]; |
|
static const char kRequiredFilesKey_PlatformValue_Android[]; |
|
static const char kRequiredFilesKey_PlatformValue_Fuchsia[]; |
|
+ static const char kRequiredFilesKey_PlatformValue_Haiku[]; |
|
}; |
|
|
|
} // namespace catalog |
|
diff --git a/src/3rdparty/chromium/skia/ext/platform_canvas.h b/src/3rdparty/chromium/skia/ext/platform_canvas.h |
|
index c31e7c021..22bb97a03 100644 |
|
--- a/src/3rdparty/chromium/skia/ext/platform_canvas.h |
|
+++ b/src/3rdparty/chromium/skia/ext/platform_canvas.h |
|
@@ -58,7 +58,7 @@ SK_API HDC GetNativeDrawingContext(SkCanvas* canvas); |
|
|
|
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ |
|
defined(__sun) || defined(ANDROID) || defined(__APPLE__) || \ |
|
- defined(__Fuchsia__) |
|
+ defined(__Fuchsia__) || defined(__HAIKU__) |
|
// Construct a canvas from the given memory region. The memory is not cleared |
|
// first. @data must be, at least, @height * StrideForWidth(@width) bytes. |
|
SK_API std::unique_ptr<SkCanvas> CreatePlatformCanvasWithPixels( |
|
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc |
|
index 10f1c0df1..6f7451449 100644 |
|
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc |
|
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc |
|
@@ -12,6 +12,8 @@ |
|
#include <stddef.h> |
|
#include <windows.h> |
|
#include <winnt.h> |
|
+#elif defined(OS_HAIKU) |
|
+#include <OS.h> |
|
#elif defined(__GLIBC__) |
|
extern "C" void* __libc_stack_end; // NOLINT |
|
#endif |
|
@@ -87,7 +89,7 @@ size_t GetUnderestimatedStackSize() { |
|
#endif |
|
} |
|
return pthread_get_stacksize_np(pthread_self()); |
|
-#elif defined(OS_WIN) && defined(COMPILER_MSVC) |
|
+#elif defined(OS_HAIKU) || (defined(OS_WIN) && defined(COMPILER_MSVC)) |
|
return WTFThreadData::ThreadStackSize(); |
|
#else |
|
#error "Stack frame size estimation not supported on this platform." |
|
@@ -138,6 +140,10 @@ void* GetStackStart() { |
|
#else |
|
return reinterpret_cast<void*>(__readfsdword(offsetof(NT_TIB, StackBase))); |
|
#endif |
|
+#elif defined(OS_HAIKU) |
|
+ thread_info threadInfo; |
|
+ get_thread_info(find_thread(NULL), &threadInfo); |
|
+ return threadInfo.stack_base; |
|
#else |
|
#error Unsupported getStackStart on this platform. |
|
#endif |
|
@@ -193,6 +199,17 @@ size_t ThreadStackSize() { |
|
thread_stack_size -= 4 * 0x1000; |
|
return thread_stack_size; |
|
} |
|
+#elif defined(OS_HAIKU) |
|
+size_t ThreadStackSize() { |
|
+ thread_info threadInfo; |
|
+ get_thread_info(find_thread(NULL), &threadInfo); |
|
+ uint8_t* stack_end = reinterpret_cast<uint8_t*>(threadInfo.stack_end); |
|
+ uint8_t* stack_start = reinterpret_cast<uint8_t*>(threadInfo.stack_base); |
|
+ CHECK(stack_start); |
|
+ CHECK_GT(stack_start, stack_end); |
|
+ size_t thread_stack_size = static_cast<size_t>(stack_start - stack_end); |
|
+ return thread_stack_size; |
|
+} |
|
#endif |
|
|
|
} // namespace internal |
|
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.h b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.h |
|
index b94f759bc..6908df7b2 100644 |
|
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.h |
|
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.h |
|
@@ -22,7 +22,7 @@ WTF_EXPORT extern uintptr_t g_main_thread_underestimated_stack_size; |
|
|
|
WTF_EXPORT void InitializeMainThreadStackEstimate(); |
|
|
|
-#if defined(OS_WIN) && defined(COMPILER_MSVC) |
|
+#if defined(OS_HAIKU) || (defined(OS_WIN) && defined(COMPILER_MSVC)) |
|
size_t ThreadStackSize(); |
|
#endif |
|
|
|
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.cc |
|
index 1bd1b1032..a41edbdf7 100644 |
|
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.cc |
|
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.cc |
|
@@ -49,7 +49,7 @@ void WTFThreadData::Initialize() { |
|
WtfThreadData(); |
|
} |
|
|
|
-#if defined(OS_WIN) && defined(COMPILER_MSVC) |
|
+#if defined(OS_HAIKU) || (defined(OS_WIN) && defined(COMPILER_MSVC)) |
|
size_t WTFThreadData::ThreadStackSize() { |
|
// Needed to bootstrap WTFThreadData on Windows, because this value is needed |
|
// before the main thread data is fully initialized. |
|
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.h b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.h |
|
index 84707d248..c6988be9e 100644 |
|
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.h |
|
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/wtf_thread_data.h |
|
@@ -62,7 +62,7 @@ class WTF_EXPORT WTFThreadData { |
|
// Must be called on the main thread before any callers to wtfThreadData(). |
|
static void Initialize(); |
|
|
|
-#if defined(OS_WIN) && defined(COMPILER_MSVC) |
|
+#if defined(OS_HAIKU) || (defined(OS_WIN) && defined(COMPILER_MSVC)) |
|
static size_t ThreadStackSize(); |
|
#endif |
|
|
|
@@ -73,7 +73,7 @@ class WTF_EXPORT WTFThreadData { |
|
|
|
ThreadIdentifier thread_id_; |
|
|
|
-#if defined(OS_WIN) && defined(COMPILER_MSVC) |
|
+#if defined(OS_HAIKU) || (defined(OS_WIN) && defined(COMPILER_MSVC)) |
|
size_t thread_stack_size_ = 0u; |
|
#endif |
|
|
|
diff --git a/src/3rdparty/chromium/third_party/khronos/EGL/eglplatform.h b/src/3rdparty/chromium/third_party/khronos/EGL/eglplatform.h |
|
index cf2ce0c4c..3a3fe3bc3 100644 |
|
--- a/src/3rdparty/chromium/third_party/khronos/EGL/eglplatform.h |
|
+++ b/src/3rdparty/chromium/third_party/khronos/EGL/eglplatform.h |
|
@@ -99,6 +99,13 @@ typedef intptr_t EGLNativeDisplayType; |
|
typedef intptr_t EGLNativeWindowType; |
|
typedef intptr_t EGLNativePixmapType; |
|
|
|
+#elif defined(__HAIKU__) |
|
+ |
|
+#include <kernel/image.h> |
|
+typedef void *EGLNativeDisplayType; |
|
+typedef uintptr_t EGLNativePixmapType; |
|
+typedef uintptr_t EGLNativeWindowType; |
|
+ |
|
#elif defined(__unix__) |
|
|
|
/* X11 (tentative) */ |
|
diff --git a/src/3rdparty/chromium/third_party/skia/include/core/SkPreConfig.h b/src/3rdparty/chromium/third_party/skia/include/core/SkPreConfig.h |
|
index 11d541d87..5c0d60b37 100644 |
|
--- a/src/3rdparty/chromium/third_party/skia/include/core/SkPreConfig.h |
|
+++ b/src/3rdparty/chromium/third_party/skia/include/core/SkPreConfig.h |
|
@@ -31,7 +31,8 @@ |
|
#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || \ |
|
defined(__OpenBSD__) || defined(__sun) || defined(__NetBSD__) || \ |
|
defined(__DragonFly__) || defined(__Fuchsia__) || \ |
|
- defined(__GLIBC__) || defined(__GNU__) || defined(__unix__) |
|
+ defined(__GLIBC__) || defined(__GNU__) || defined(__unix__) || \ |
|
+ defined(__HAIKU__) |
|
#define SK_BUILD_FOR_UNIX |
|
#elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR |
|
#define SK_BUILD_FOR_IOS |
|
diff --git a/src/3rdparty/chromium/third_party/skia/src/gpu/GrAutoLocaleSetter.h b/src/3rdparty/chromium/third_party/skia/src/gpu/GrAutoLocaleSetter.h |
|
index f6a10e5b7..1afb8b22e 100644 |
|
--- a/src/3rdparty/chromium/third_party/skia/src/gpu/GrAutoLocaleSetter.h |
|
+++ b/src/3rdparty/chromium/third_party/skia/src/gpu/GrAutoLocaleSetter.h |
|
@@ -27,7 +27,7 @@ |
|
#define HAVE_XLOCALE 0 |
|
#endif |
|
|
|
-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) |
|
+#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__HAIKU__) |
|
#define HAVE_LOCALE_T 0 |
|
#else |
|
#define HAVE_LOCALE_T 1 |
|
diff --git a/src/3rdparty/chromium/third_party/webrtc/BUILD.gn b/src/3rdparty/chromium/third_party/webrtc/BUILD.gn |
|
index 4420843c6..d99d15ce2 100644 |
|
--- a/src/3rdparty/chromium/third_party/webrtc/BUILD.gn |
|
+++ b/src/3rdparty/chromium/third_party/webrtc/BUILD.gn |
|
@@ -120,7 +120,7 @@ config("common_inherited_config") { |
|
".", |
|
] |
|
} |
|
- if (is_posix || is_fuchsia) { |
|
+ if (is_posix || is_fuchsia || is_haiku) { |
|
defines += [ "WEBRTC_POSIX" ] |
|
} |
|
if (is_ios) { |
|
@@ -138,6 +138,9 @@ config("common_inherited_config") { |
|
if (is_fuchsia) { |
|
defines += [ "WEBRTC_FUCHSIA" ] |
|
} |
|
+ if (is_haiku) { |
|
+ defines += [ "WEBRTC_HAIKU", "_BSD_SOURCE" ] |
|
+ } |
|
if (is_win) { |
|
defines += [ "WEBRTC_WIN" ] |
|
} |
|
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/BUILD.gn b/src/3rdparty/chromium/third_party/webrtc/rtc_base/BUILD.gn |
|
index 982d5c4be..52607d158 100644 |
|
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/BUILD.gn |
|
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/BUILD.gn |
|
@@ -962,6 +962,10 @@ rtc_static_library("rtc_base_generic") { |
|
] |
|
} |
|
|
|
+ if (is_haiku) { |
|
+ defines += [ "_BSD_SOURCE" ] |
|
+ } |
|
+ |
|
if (is_nacl) { |
|
deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
|
defines += [ "timezone=_timezone" ] |
|
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.cc |
|
index c52c9a4ad..07ffd8872 100644 |
|
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.cc |
|
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.cc |
|
@@ -10,6 +10,9 @@ |
|
|
|
#if defined(WEBRTC_POSIX) |
|
#include <netinet/in.h> |
|
+#if defined(WEBRTC_HAIKU) |
|
+#include <netinet6/in6.h> |
|
+#endif |
|
#include <sys/socket.h> |
|
#include <sys/types.h> |
|
#ifdef OPENBSD |
|
@@ -40,12 +43,12 @@ namespace rtc { |
|
|
|
// Prefixes used for categorizing IPv6 addresses. |
|
static const in6_addr kV4MappedPrefix = { |
|
- {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0}}}; |
|
-static const in6_addr k6To4Prefix = {{{0x20, 0x02, 0}}}; |
|
-static const in6_addr kTeredoPrefix = {{{0x20, 0x01, 0x00, 0x00}}}; |
|
-static const in6_addr kV4CompatibilityPrefix = {{{0}}}; |
|
-static const in6_addr k6BonePrefix = {{{0x3f, 0xfe, 0}}}; |
|
-static const in6_addr kPrivateNetworkPrefix = {{{0xFD}}}; |
|
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0}}; |
|
+static const in6_addr k6To4Prefix = {{0x20, 0x02, 0}}; |
|
+static const in6_addr kTeredoPrefix = {{0x20, 0x01, 0x00, 0x00}}; |
|
+static const in6_addr kV4CompatibilityPrefix = {{0}}; |
|
+static const in6_addr k6BonePrefix = {{0x3f, 0xfe, 0}}; |
|
+static const in6_addr kPrivateNetworkPrefix = {{0xFD}}; |
|
|
|
static bool IPIsHelper(const IPAddress& ip, |
|
const in6_addr& tomatch, |
|
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc |
|
index 0f42d6fe3..d15ff675c 100644 |
|
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc |
|
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc |
|
@@ -17,6 +17,9 @@ |
|
#if defined(WEBRTC_LINUX) |
|
#include <linux/if.h> |
|
#include <linux/route.h> |
|
+#elif defined(WEBRTC_HAIKU) |
|
+#include <ifaddrs.h> |
|
+#define IFF_RUNNING IFF_LINK |
|
#elif !defined(__native_client__) |
|
#include <net/if.h> |
|
#endif |
|
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc |
|
index ca7849917..aea772710 100644 |
|
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc |
|
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc |
|
@@ -67,7 +67,7 @@ typedef void* SockOptArg; |
|
|
|
#endif // WEBRTC_POSIX |
|
|
|
-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) |
|
+#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) && !defined(OS_HAIKU) |
|
|
|
int64_t GetSocketRecvTimestamp(int socket) { |
|
struct timeval tv_ioctl; |
|
@@ -538,7 +538,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) { |
|
*slevel = IPPROTO_IP; |
|
*sopt = IP_DONTFRAGMENT; |
|
break; |
|
-#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__) |
|
+#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__) || defined(WEBRTC_HAIKU) |
|
RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported."; |
|
return -1; |
|
#elif defined(WEBRTC_POSIX) |
|
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc |
|
index 15d48618b..ac4a04d77 100644 |
|
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc |
|
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc |
|
@@ -13,6 +13,8 @@ |
|
#if defined(WEBRTC_LINUX) |
|
#include <sys/prctl.h> |
|
#include <sys/syscall.h> |
|
+#elif defined(WEBRTC_HAIKU) |
|
+#include <OS.h> |
|
#endif |
|
|
|
namespace rtc { |
|
@@ -27,6 +29,8 @@ PlatformThreadId CurrentThreadId() { |
|
return gettid(); |
|
#elif defined(WEBRTC_FUCHSIA) |
|
return zx_thread_self(); |
|
+#elif defined(WEBRTC_HAIKU) |
|
+ return find_thread(NULL); |
|
#elif defined(WEBRTC_LINUX) |
|
return syscall(__NR_gettid); |
|
#else |
|
@@ -72,6 +76,8 @@ void SetCurrentThreadName(const char* name) { |
|
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT |
|
#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) |
|
pthread_setname_np(name); |
|
+#elif defined(WEBRTC_HAIKU) |
|
+ rename_thread(find_thread(NULL), name); |
|
#endif |
|
} |
|
|
|
diff --git a/src/3rdparty/chromium/third_party/yasm/BUILD.gn b/src/3rdparty/chromium/third_party/yasm/BUILD.gn |
|
index b261e4d88..858d52d31 100644 |
|
--- a/src/3rdparty/chromium/third_party/yasm/BUILD.gn |
|
+++ b/src/3rdparty/chromium/third_party/yasm/BUILD.gn |
|
@@ -75,6 +75,9 @@ if (current_toolchain == host_toolchain) { |
|
if (is_posix || is_fuchsia) { |
|
cflags = [ "-std=gnu99" ] |
|
} |
|
+ if (is_haiku) { |
|
+ libs = [ "intl" ] |
|
+ } |
|
} |
|
|
|
executable("genmacro") { |
|
diff --git a/src/3rdparty/chromium/third_party/yasm/source/config/haiku/config.h b/src/3rdparty/chromium/third_party/yasm/source/config/haiku/config.h |
|
new file mode 100644 |
|
index 000000000..21eb088fe |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/third_party/yasm/source/config/haiku/config.h |
|
@@ -0,0 +1,173 @@ |
|
+/* config.h. Generated from config.h.in by configure. */ |
|
+/* config.h.in. Generated from configure.ac by autoheader. */ |
|
+ |
|
+/* Command name to run C preprocessor */ |
|
+#define CPP_PROG "cc -E" |
|
+ |
|
+/* */ |
|
+#define ENABLE_NLS 1 |
|
+ |
|
+/* Define to 1 if you have the `abort' function. */ |
|
+#define HAVE_ABORT 1 |
|
+ |
|
+/* */ |
|
+/* #undef HAVE_CATGETS */ |
|
+ |
|
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the |
|
+ CoreFoundation framework. */ |
|
+/* #undef HAVE_CFLOCALECOPYCURRENT */ |
|
+ |
|
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in |
|
+ the CoreFoundation framework. */ |
|
+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ |
|
+ |
|
+/* Define if the GNU dcgettext() function is already present or preinstalled. |
|
+ */ |
|
+#define HAVE_DCGETTEXT 1 |
|
+ |
|
+/* Define to 1 if you have the <direct.h> header file. */ |
|
+/* #undef HAVE_DIRECT_H */ |
|
+ |
|
+/* Define to 1 if you have the `ftruncate' function. */ |
|
+#define HAVE_FTRUNCATE 1 |
|
+ |
|
+/* Define to 1 if you have the `getcwd' function. */ |
|
+#define HAVE_GETCWD 1 |
|
+ |
|
+/* */ |
|
+#define HAVE_GETTEXT 1 |
|
+ |
|
+/* Define to 1 if you have the GNU C Library */ |
|
+/* #undef HAVE_GNU_C_LIBRARY */ |
|
+ |
|
+/* Define if you have the iconv() function and it works. */ |
|
+#define HAVE_ICONV 1 |
|
+ |
|
+/* Define to 1 if you have the <inttypes.h> header file. */ |
|
+#define HAVE_INTTYPES_H 1 |
|
+ |
|
+/* */ |
|
+/* #undef HAVE_LC_MESSAGES */ |
|
+ |
|
+/* Define to 1 if you have the <libgen.h> header file. */ |
|
+#define HAVE_LIBGEN_H 1 |
|
+ |
|
+/* Define to 1 if you have the <memory.h> header file. */ |
|
+#define HAVE_MEMORY_H 1 |
|
+ |
|
+/* Define to 1 if you have the `mergesort' function. */ |
|
+#define HAVE_MERGESORT 1 |
|
+ |
|
+/* Define to 1 if you have the `popen' function. */ |
|
+#define HAVE_POPEN 1 |
|
+ |
|
+/* Define to 1 if you have the <stdint.h> header file. */ |
|
+#define HAVE_STDINT_H 1 |
|
+ |
|
+/* Define to 1 if you have the <stdlib.h> header file. */ |
|
+#define HAVE_STDLIB_H 1 |
|
+ |
|
+/* */ |
|
+/* #undef HAVE_STPCPY */ |
|
+ |
|
+/* Define to 1 if you have the `strcasecmp' function. */ |
|
+#define HAVE_STRCASECMP 1 |
|
+ |
|
+/* Define to 1 if you have the `strcmpi' function. */ |
|
+/* #undef HAVE_STRCMPI */ |
|
+ |
|
+/* Define to 1 if you have the `stricmp' function. */ |
|
+/* #undef HAVE_STRICMP */ |
|
+ |
|
+/* Define to 1 if you have the <strings.h> header file. */ |
|
+#define HAVE_STRINGS_H 1 |
|
+ |
|
+/* Define to 1 if you have the <string.h> header file. */ |
|
+#define HAVE_STRING_H 1 |
|
+ |
|
+/* Define to 1 if you have the `strncasecmp' function. */ |
|
+#define HAVE_STRNCASECMP 1 |
|
+ |
|
+/* Define to 1 if you have the `strsep' function. */ |
|
+/* #undef HAVE_STRSEP */ |
|
+ |
|
+/* Define to 1 if you have the <sys/stat.h> header file. */ |
|
+#define HAVE_SYS_STAT_H 1 |
|
+ |
|
+/* Define to 1 if you have the <sys/types.h> header file. */ |
|
+#define HAVE_SYS_TYPES_H 1 |
|
+ |
|
+/* Define to 1 if you have the `toascii' function. */ |
|
+#define HAVE_TOASCII 1 |
|
+ |
|
+/* Define to 1 if you have the <unistd.h> header file. */ |
|
+#define HAVE_UNISTD_H 1 |
|
+ |
|
+/* Define to 1 if you have the `vsnprintf' function. */ |
|
+#define HAVE_VSNPRINTF 1 |
|
+ |
|
+/* Define to 1 if you have the `_stricmp' function. */ |
|
+/* #undef HAVE__STRICMP */ |
|
+ |
|
+/* Name of package */ |
|
+#define PACKAGE "yasm" |
|
+ |
|
+/* Define to the address where bug reports for this package should be sent. */ |
|
+#define PACKAGE_BUGREPORT "[email protected]" |
|
+ |
|
+/* Define to the full name of this package. */ |
|
+#define PACKAGE_NAME "yasm" |
|
+ |
|
+/* Define to the full name and version of this package. */ |
|
+#define PACKAGE_STRING "yasm 1.3.0" |
|
+ |
|
+/* Define to the one symbol short name of this package. */ |
|
+#define PACKAGE_TARNAME "yasm" |
|
+ |
|
+/* Define to the home page for this package. */ |
|
+#define PACKAGE_URL "" |
|
+ |
|
+/* Define to the version of this package. */ |
|
+#define PACKAGE_VERSION "1.3.0" |
|
+ |
|
+/* Define to 1 if the C compiler supports function prototypes. */ |
|
+#define PROTOTYPES 1 |
|
+ |
|
+/* The size of `char', as computed by sizeof. */ |
|
+/* #undef SIZEOF_CHAR */ |
|
+ |
|
+/* The size of `int', as computed by sizeof. */ |
|
+/* #undef SIZEOF_INT */ |
|
+ |
|
+/* The size of `long', as computed by sizeof. */ |
|
+/* #undef SIZEOF_LONG */ |
|
+ |
|
+/* The size of `short', as computed by sizeof. */ |
|
+/* #undef SIZEOF_SHORT */ |
|
+ |
|
+/* The size of `void*', as computed by sizeof. */ |
|
+/* #undef SIZEOF_VOIDP */ |
|
+ |
|
+/* Define to 1 if you have the ANSI C header files. */ |
|
+#define STDC_HEADERS 1 |
|
+ |
|
+/* Version number of package */ |
|
+#define VERSION "1.3.0" |
|
+ |
|
+/* Define if using the dmalloc debugging malloc package */ |
|
+/* #undef WITH_DMALLOC */ |
|
+ |
|
+/* Define like PROTOTYPES; this can be used by system headers. */ |
|
+#define __PROTOTYPES 1 |
|
+ |
|
+/* Define to empty if `const' does not conform to ANSI C. */ |
|
+/* #undef const */ |
|
+ |
|
+/* Define to `__inline__' or `__inline' if that's what the C compiler |
|
+ calls it, or to nothing if 'inline' is not supported under any name. */ |
|
+#ifndef __cplusplus |
|
+/* #undef inline */ |
|
+#endif |
|
+ |
|
+/* Define to `unsigned int' if <sys/types.h> does not define. */ |
|
+/* #undef size_t */ |
|
diff --git a/src/3rdparty/chromium/third_party/yasm/source/config/haiku/libyasm-stdint.h b/src/3rdparty/chromium/third_party/yasm/source/config/haiku/libyasm-stdint.h |
|
new file mode 100644 |
|
index 000000000..5780da8b6 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/third_party/yasm/source/config/haiku/libyasm-stdint.h |
|
@@ -0,0 +1,9 @@ |
|
+#ifndef _YASM_LIBYASM_STDINT_H |
|
+#define _YASM_LIBYASM_STDINT_H 1 |
|
+#ifndef _GENERATED_STDINT_H |
|
+#define _GENERATED_STDINT_H "yasm 1.3.0" |
|
+/* generated using gcc */ |
|
+#define _STDINT_HAVE_STDINT_H 1 |
|
+#include <stdint.h> |
|
+#endif |
|
+#endif |
|
diff --git a/src/3rdparty/chromium/tools/grit/grit/node/base.py b/src/3rdparty/chromium/tools/grit/grit/node/base.py |
|
index e40bad88f..3093334d6 100755 |
|
--- a/src/3rdparty/chromium/tools/grit/grit/node/base.py |
|
+++ b/src/3rdparty/chromium/tools/grit/grit/node/base.py |
|
@@ -477,9 +477,11 @@ class Node(object): |
|
value = target_platform == 'ios' |
|
elif name == 'is_bsd': |
|
value = 'bsd' in target_platform |
|
+ elif name == 'is_haiku': |
|
+ value = target_platform.startswith('haiku') |
|
elif name == 'is_posix': |
|
value = (target_platform in ('darwin', 'linux2', 'linux3', 'sunos5', |
|
- 'android', 'ios') |
|
+ 'android', 'ios', 'haiku1') |
|
or 'bsd' in target_platform) |
|
|
|
elif name == 'pp_ifdef': |
|
diff --git a/src/3rdparty/chromium/ui/gfx/native_widget_types.h b/src/3rdparty/chromium/ui/gfx/native_widget_types.h |
|
index 7ceeee14e..b299de8b6 100644 |
|
--- a/src/3rdparty/chromium/ui/gfx/native_widget_types.h |
|
+++ b/src/3rdparty/chromium/ui/gfx/native_widget_types.h |
|
@@ -132,6 +132,11 @@ typedef void* NativeCursor; |
|
typedef ui::ViewAndroid* NativeView; |
|
typedef ui::WindowAndroid* NativeWindow; |
|
typedef base::android::ScopedJavaGlobalRef<jobject> NativeEvent; |
|
+#elif defined(OS_HAIKU) // FIXME |
|
+typedef void* NativeCursor; |
|
+typedef void* NativeView; |
|
+typedef void* NativeWindow; |
|
+typedef void* NativeEvent; |
|
#else |
|
#error Unknown build environment. |
|
#endif |
|
@@ -193,6 +198,9 @@ constexpr AcceleratedWidget kNullAcceleratedWidget = 0; |
|
#elif defined(OS_ANDROID) |
|
typedef ANativeWindow* AcceleratedWidget; |
|
constexpr AcceleratedWidget kNullAcceleratedWidget = 0; |
|
+#elif defined(OS_HAIKU) |
|
+typedef int32_t AcceleratedWidget; |
|
+constexpr AcceleratedWidget kNullAcceleratedWidget = 0; |
|
#elif defined(USE_OZONE) |
|
typedef int32_t AcceleratedWidget; |
|
constexpr AcceleratedWidget kNullAcceleratedWidget = 0; |
|
diff --git a/src/3rdparty/chromium/ui/gl/BUILD.gn b/src/3rdparty/chromium/ui/gl/BUILD.gn |
|
index d8f31ca14..6e63f1adb 100644 |
|
--- a/src/3rdparty/chromium/ui/gl/BUILD.gn |
|
+++ b/src/3rdparty/chromium/ui/gl/BUILD.gn |
|
@@ -200,7 +200,7 @@ component("gl") { |
|
} |
|
} |
|
|
|
- if (is_posix && !is_fuchsia && !is_mac) { |
|
+ if (is_posix && !is_fuchsia && !is_mac && !is_haiku) { |
|
# Windows has USE_EGL but doesn't support base::FileDescriptor. |
|
# libsync isn't supported or needed on MacOSX. |
|
# Fuchsia is excluded due to a libsync dependency and because it's |
|
diff --git a/src/3rdparty/chromium/ui/gl/features.gni b/src/3rdparty/chromium/ui/gl/features.gni |
|
index a1860902b..cae1c4319 100644 |
|
--- a/src/3rdparty/chromium/ui/gl/features.gni |
|
+++ b/src/3rdparty/chromium/ui/gl/features.gni |
|
@@ -13,7 +13,7 @@ declare_args() { |
|
|
|
# Should EGL support be compiled. Can be overriden to test during bring up |
|
# of EGL support on other platforms |
|
- use_egl = is_win || is_android || is_linux || is_fuchsia || is_mac |
|
+ use_egl = is_win || is_android || is_linux || is_fuchsia || is_mac || is_haiku |
|
} |
|
|
|
declare_args() { |
|
diff --git a/src/3rdparty/chromium/ui/gl/init/BUILD.gn b/src/3rdparty/chromium/ui/gl/init/BUILD.gn |
|
index d708e6c46..0a67e6e0f 100644 |
|
--- a/src/3rdparty/chromium/ui/gl/init/BUILD.gn |
|
+++ b/src/3rdparty/chromium/ui/gl/init/BUILD.gn |
|
@@ -68,5 +68,14 @@ jumbo_component("init") { |
|
] |
|
|
|
deps += [ "//ui/ozone" ] |
|
+ } else if (is_haiku) { |
|
+ sources += [ |
|
+ "gl_factory_haiku.cc", |
|
+ "gl_initializer_haiku.cc", |
|
+ ] |
|
+ deps += [ |
|
+ "//ui/gl:gl_features", |
|
+ ] |
|
+ libs = [ "GL" ] |
|
} |
|
} |
|
diff --git a/src/3rdparty/chromium/ui/gl/init/gl_factory_haiku.cc b/src/3rdparty/chromium/ui/gl/init/gl_factory_haiku.cc |
|
new file mode 100644 |
|
index 000000000..945e25497 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/ui/gl/init/gl_factory_haiku.cc |
|
@@ -0,0 +1,157 @@ |
|
+// Copyright 2016 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "ui/gl/init/gl_factory.h" |
|
+ |
|
+#include "base/trace_event/trace_event.h" |
|
+#include "ui/gl/gl_context.h" |
|
+#include "ui/gl/gl_context_egl.h" |
|
+#include "ui/gl/gl_context_osmesa.h" |
|
+#include "ui/gl/gl_context_stub.h" |
|
+#include "ui/gl/gl_egl_api_implementation.h" |
|
+#include "ui/gl/gl_implementation.h" |
|
+#include "ui/gl/gl_share_group.h" |
|
+#include "ui/gl/gl_surface.h" |
|
+#include "ui/gl/gl_surface_egl.h" |
|
+#include "ui/gl/gl_surface_osmesa.h" |
|
+#include "ui/gl/gl_surface_stub.h" |
|
+ |
|
+namespace gl { |
|
+namespace init { |
|
+ |
|
+std::vector<GLImplementation> GetAllowedGLImplementations() { |
|
+ std::vector<GLImplementation> impls; |
|
+ //impls.push_back(kGLImplementationDesktopGL); |
|
+ impls.push_back(kGLImplementationEGLGLES2); |
|
+ impls.push_back(kGLImplementationOSMesaGL); |
|
+ impls.push_back(kGLImplementationSwiftShaderGL); |
|
+ return impls; |
|
+} |
|
+ |
|
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { |
|
+ switch (GetGLImplementation()) { |
|
+ case kGLImplementationDesktopGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ return GetGLWindowSystemBindingInfoEGL(info); |
|
+ default: |
|
+ return false; |
|
+ } |
|
+} |
|
+ |
|
+scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group, |
|
+ GLSurface* compatible_surface, |
|
+ const GLContextAttribs& attribs) { |
|
+ TRACE_EVENT0("gpu", "gl::init::CreateGLContext"); |
|
+ switch (GetGLImplementation()) { |
|
+ case kGLImplementationOSMesaGL: |
|
+ return InitializeGLContext(new GLContextOSMesa(share_group), |
|
+ compatible_surface, attribs); |
|
+ case kGLImplementationDesktopGL: |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ return InitializeGLContext(new GLContextEGL(share_group), |
|
+ compatible_surface, attribs); |
|
+ case kGLImplementationMockGL: |
|
+ return new GLContextStub(share_group); |
|
+ case kGLImplementationStubGL: { |
|
+ scoped_refptr<GLContextStub> stub_context = |
|
+ new GLContextStub(share_group); |
|
+ stub_context->SetUseStubApi(true); |
|
+ return stub_context; |
|
+ } |
|
+ default: |
|
+ NOTREACHED(); |
|
+ return nullptr; |
|
+ } |
|
+} |
|
+ |
|
+#ifndef TOOLKIT_QT |
|
+scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) { |
|
+ TRACE_EVENT0("gpu", "gl::init::CreateViewGLSurface"); |
|
+ switch (GetGLImplementation()) { |
|
+ case kGLImplementationOSMesaGL: |
|
+ return InitializeGLSurface(new GLSurfaceOSMesaX11(window)); |
|
+ case kGLImplementationDesktopGL: |
|
+ return InitializeGLSurface(new GLSurfaceGLXX11(window)); |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ DCHECK(window != gfx::kNullAcceleratedWidget); |
|
+ return InitializeGLSurface(new NativeViewGLSurfaceEGLX11(window)); |
|
+ case kGLImplementationMockGL: |
|
+ case kGLImplementationStubGL: |
|
+ return new GLSurfaceStub; |
|
+ default: |
|
+ NOTREACHED(); |
|
+ return nullptr; |
|
+ } |
|
+} |
|
+ |
|
+scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( |
|
+ const gfx::Size& size, GLSurfaceFormat format) { |
|
+ TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface"); |
|
+ switch (GetGLImplementation()) { |
|
+ case kGLImplementationOSMesaGL: |
|
+ format.SetDefaultPixelLayout(GLSurfaceFormat::PIXEL_LAYOUT_RGBA); |
|
+ return InitializeGLSurfaceWithFormat( |
|
+ new GLSurfaceOSMesa(format, size), format); |
|
+ case kGLImplementationDesktopGL: |
|
+ return InitializeGLSurfaceWithFormat( |
|
+ new UnmappedNativeViewGLSurfaceGLX(size), format); |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() && |
|
+ size.width() == 0 && size.height() == 0) { |
|
+ return InitializeGLSurfaceWithFormat(new SurfacelessEGL(size), format); |
|
+ } else { |
|
+ return InitializeGLSurfaceWithFormat(new PbufferGLSurfaceEGL(size), |
|
+ format); |
|
+ } |
|
+ case kGLImplementationMockGL: |
|
+ case kGLImplementationStubGL: |
|
+ return new GLSurfaceStub; |
|
+ default: |
|
+ NOTREACHED(); |
|
+ return nullptr; |
|
+ } |
|
+} |
|
+#endif |
|
+ |
|
+void SetDisabledExtensionsPlatform(const std::string& disabled_extensions) { |
|
+ GLImplementation implementation = GetGLImplementation(); |
|
+ DCHECK_NE(kGLImplementationNone, implementation); |
|
+ switch (implementation) { |
|
+ case kGLImplementationDesktopGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ SetDisabledExtensionsEGL(disabled_extensions); |
|
+ break; |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationOSMesaGL: |
|
+ case kGLImplementationMockGL: |
|
+ case kGLImplementationStubGL: |
|
+ break; |
|
+ default: |
|
+ NOTREACHED(); |
|
+ } |
|
+} |
|
+ |
|
+bool InitializeExtensionSettingsOneOffPlatform() { |
|
+ GLImplementation implementation = GetGLImplementation(); |
|
+ DCHECK_NE(kGLImplementationNone, implementation); |
|
+ switch (implementation) { |
|
+ case kGLImplementationDesktopGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ return InitializeExtensionSettingsOneOffEGL(); |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationOSMesaGL: |
|
+ case kGLImplementationMockGL: |
|
+ case kGLImplementationStubGL: |
|
+ return true; |
|
+ default: |
|
+ NOTREACHED(); |
|
+ return false; |
|
+ } |
|
+} |
|
+ |
|
+} // namespace init |
|
+} // namespace gl |
|
diff --git a/src/3rdparty/chromium/ui/gl/init/gl_initializer_haiku.cc b/src/3rdparty/chromium/ui/gl/init/gl_initializer_haiku.cc |
|
new file mode 100644 |
|
index 000000000..e828e5088 |
|
--- /dev/null |
|
+++ b/src/3rdparty/chromium/ui/gl/init/gl_initializer_haiku.cc |
|
@@ -0,0 +1,174 @@ |
|
+// Copyright 2016 The Chromium Authors. All rights reserved. |
|
+// Use of this source code is governed by a BSD-style license that can be |
|
+// found in the LICENSE file. |
|
+ |
|
+#include "ui/gl/init/gl_initializer.h" |
|
+ |
|
+#include "base/command_line.h" |
|
+#include "base/logging.h" |
|
+#include "base/path_service.h" |
|
+#include "base/threading/thread_restrictions.h" |
|
+#include "build/build_config.h" |
|
+#include "ui/gfx/switches.h" |
|
+#include "ui/gl/gl_bindings.h" |
|
+#include "ui/gl/gl_egl_api_implementation.h" |
|
+#include "ui/gl/gl_features.h" |
|
+#include "ui/gl/gl_gl_api_implementation.h" |
|
+#include "ui/gl/gl_implementation_osmesa.h" |
|
+#include "ui/gl/gl_osmesa_api_implementation.h" |
|
+#include "ui/gl/gl_surface_egl.h" |
|
+#include "ui/gl/gl_switches.h" |
|
+ |
|
+namespace gl { |
|
+namespace init { |
|
+ |
|
+namespace { |
|
+ |
|
+#if defined(OS_OPENBSD) || defined(OS_HAIKU) |
|
+const char kGLLibraryName[] = "libGL.so"; |
|
+#else |
|
+const char kGLLibraryName[] = "libGL.so.1"; |
|
+#endif |
|
+ |
|
+const char kGLESv2LibraryName[] = "libGLESv2.so.2"; |
|
+const char kEGLLibraryName[] = "libEGL.so.1"; |
|
+ |
|
+const char kGLESv2ANGLELibraryName[] = "libGLESv2.so"; |
|
+const char kEGLANGLELibraryName[] = "libEGL.so"; |
|
+ |
|
+#if BUILDFLAG(ENABLE_SWIFTSHADER) |
|
+const char kGLESv2SwiftShaderLibraryName[] = "libGLESv2.so"; |
|
+const char kEGLSwiftShaderLibraryName[] = "libEGL.so"; |
|
+#endif |
|
+ |
|
+bool InitializeStaticEGLInternal(GLImplementation implementation) { |
|
+ base::FilePath glesv2_path(kGLESv2LibraryName); |
|
+ base::FilePath egl_path(kEGLLibraryName); |
|
+ |
|
+ const base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
|
+ |
|
+ if (implementation == kGLImplementationSwiftShaderGL) { |
|
+#if BUILDFLAG(ENABLE_SWIFTSHADER) |
|
+ base::FilePath module_path; |
|
+ if (!base::PathService::Get(base::DIR_MODULE, &module_path)) |
|
+ return false; |
|
+ module_path = module_path.Append("swiftshader/"); |
|
+ |
|
+ glesv2_path = module_path.Append(kGLESv2SwiftShaderLibraryName); |
|
+ egl_path = module_path.Append(kEGLSwiftShaderLibraryName); |
|
+#else |
|
+ return false; |
|
+#endif |
|
+ } else if (cmd->GetSwitchValueASCII(switches::kUseGL) == |
|
+ kGLImplementationANGLEName) { |
|
+ base::FilePath module_path; |
|
+ if (!base::PathService::Get(base::DIR_MODULE, &module_path)) |
|
+ return false; |
|
+ |
|
+ glesv2_path = module_path.Append(kGLESv2ANGLELibraryName); |
|
+ egl_path = module_path.Append(kEGLANGLELibraryName); |
|
+ } |
|
+ |
|
+ base::NativeLibrary gles_library = LoadLibraryAndPrintError(glesv2_path); |
|
+ if (!gles_library) |
|
+ return false; |
|
+ base::NativeLibrary egl_library = LoadLibraryAndPrintError(egl_path); |
|
+ if (!egl_library) { |
|
+ base::UnloadNativeLibrary(gles_library); |
|
+ return false; |
|
+ } |
|
+ |
|
+ GLGetProcAddressProc get_proc_address = |
|
+ reinterpret_cast<GLGetProcAddressProc>( |
|
+ base::GetFunctionPointerFromNativeLibrary(egl_library, |
|
+ "eglGetProcAddress")); |
|
+ if (!get_proc_address) { |
|
+ LOG(ERROR) << "eglGetProcAddress not found."; |
|
+ base::UnloadNativeLibrary(egl_library); |
|
+ base::UnloadNativeLibrary(gles_library); |
|
+ return false; |
|
+ } |
|
+ |
|
+ SetGLGetProcAddressProc(get_proc_address); |
|
+ AddGLNativeLibrary(egl_library); |
|
+ AddGLNativeLibrary(gles_library); |
|
+ SetGLImplementation(kGLImplementationEGLGLES2); |
|
+ |
|
+ InitializeStaticGLBindingsGL(); |
|
+ InitializeStaticGLBindingsEGL(); |
|
+ |
|
+ return true; |
|
+} |
|
+ |
|
+} // namespace |
|
+ |
|
+#if !defined(TOOLKIT_QT) |
|
+bool InitializeGLOneOffPlatform() { |
|
+ const base::CommandLine* command_line = |
|
+ base::CommandLine::ForCurrentProcess(); |
|
+ if (command_line->HasSwitch(switches::kHeadless) && |
|
+ command_line->GetSwitchValueASCII(switches::kUseGL) == |
|
+ kGLImplementationOSMesaName) |
|
+ return true; |
|
+ |
|
+ switch (GetGLImplementation()) { |
|
+ case kGLImplementationDesktopGL: |
|
+ return true; |
|
+ case kGLImplementationOSMesaGL: |
|
+ return true; |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ /*if (!GLSurfaceEGL::InitializeOneOff(gfx::GetXDisplay())) { |
|
+ LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; |
|
+ return false; |
|
+ }*/ |
|
+ return true; |
|
+ default: |
|
+ return true; |
|
+ } |
|
+} |
|
+ |
|
+#endif // !defined(TOOLKIT_QT) |
|
+bool InitializeStaticGLBindings(GLImplementation implementation) { |
|
+ // Prevent reinitialization with a different implementation. Once the gpu |
|
+ // unit tests have initialized with kGLImplementationMock, we don't want to |
|
+ // later switch to another GL implementation. |
|
+ DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); |
|
+ |
|
+ // Allow the main thread or another to initialize these bindings |
|
+ // after instituting restrictions on I/O. Going forward they will |
|
+ // likely be used in the browser process on most platforms. The |
|
+ // one-time initialization cost is small, between 2 and 5 ms. |
|
+ base::ThreadRestrictions::ScopedAllowIO allow_io; |
|
+ |
|
+ switch (implementation) { |
|
+ case kGLImplementationOSMesaGL: |
|
+ case kGLImplementationDesktopGL: |
|
+ case kGLImplementationSwiftShaderGL: |
|
+ case kGLImplementationEGLGLES2: |
|
+ return InitializeStaticEGLInternal(implementation); |
|
+ case kGLImplementationMockGL: |
|
+ case kGLImplementationStubGL: |
|
+ SetGLImplementation(implementation); |
|
+ InitializeStaticGLBindingsGL(); |
|
+ return true; |
|
+ default: |
|
+ NOTREACHED(); |
|
+ } |
|
+ |
|
+ return false; |
|
+} |
|
+ |
|
+void InitializeDebugGLBindings() { |
|
+ InitializeDebugGLBindingsEGL(); |
|
+ InitializeDebugGLBindingsGL(); |
|
+} |
|
+ |
|
+void ShutdownGLPlatform() { |
|
+ GLSurfaceEGL::ShutdownOneOff(); |
|
+ ClearBindingsEGL(); |
|
+ ClearBindingsGL(); |
|
+} |
|
+ |
|
+} // namespace init |
|
+} // namespace gl |
|
diff --git a/src/3rdparty/chromium/v8/include/v8config.h b/src/3rdparty/chromium/v8/include/v8config.h |
|
index d8e1f36c1..2d91d8d29 100644 |
|
--- a/src/3rdparty/chromium/v8/include/v8config.h |
|
+++ b/src/3rdparty/chromium/v8/include/v8config.h |
|
@@ -116,6 +116,9 @@ |
|
# define V8_OS_QNX 1 |
|
#elif defined(_WIN32) |
|
# define V8_OS_WIN 1 |
|
+#elif defined(__HAIKU__) |
|
+# define V8_OS_HAIKU 1 |
|
+# define V8_OS_POSIX 1 |
|
#endif |
|
|
|
|
|
diff --git a/src/3rdparty/chromium/v8/src/base/export-template.h b/src/3rdparty/chromium/v8/src/base/export-template.h |
|
index 861cfe402..4bf428167 100644 |
|
--- a/src/3rdparty/chromium/v8/src/base/export-template.h |
|
+++ b/src/3rdparty/chromium/v8/src/base/export-template.h |
|
@@ -150,6 +150,7 @@ |
|
#export) |
|
#define EXPORT_TEMPLATE_TEST_DEFAULT_DEFAULT(...) true |
|
#define EXPORT_TEMPLATE_TEST_MSVC_HACK_MSVC_HACK(...) true |
|
+#define EXPORT_TEMPLATE_TEST_MSVC_HACK_DEFAULT(...) true |
|
|
|
EXPORT_TEMPLATE_TEST(DEFAULT, ); |
|
EXPORT_TEMPLATE_TEST(DEFAULT, __attribute__((visibility("default")))); |
|
@@ -159,5 +160,6 @@ EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); |
|
#undef EXPORT_TEMPLATE_TEST |
|
#undef EXPORT_TEMPLATE_TEST_DEFAULT_DEFAULT |
|
#undef EXPORT_TEMPLATE_TEST_MSVC_HACK_MSVC_HACK |
|
+#undef EXPORT_TEMPLATE_TEST_MSVC_HACK_DEFAULT |
|
|
|
#endif // V8_BASE_EXPORT_TEMPLATE_H_ |
|
diff --git a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc |
|
index cf7f3ec9b..5efacbe81 100644 |
|
--- a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc |
|
+++ b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc |
|
@@ -60,7 +60,7 @@ |
|
#include <sys/resource.h> |
|
#endif |
|
|
|
-#if !defined(_AIX) && !defined(V8_OS_FUCHSIA) |
|
+#if !defined(_AIX) && !defined(V8_OS_FUCHSIA) && !defined(V8_OS_HAIKU) |
|
#include <sys/syscall.h> |
|
#endif |
|
|
|
@@ -76,6 +76,11 @@ extern int madvise(caddr_t, size_t, int); |
|
#endif |
|
#endif |
|
|
|
+#if defined(V8_OS_HAIKU) |
|
+#define madvise posix_madvise |
|
+#define MADV_DONTNEED POSIX_MADV_DONTNEED |
|
+#endif |
|
+ |
|
#ifndef MADV_FREE |
|
#define MADV_FREE MADV_DONTNEED |
|
#endif |
|
@@ -127,7 +132,7 @@ int GetProtectionFromMemoryPermission(OS::MemoryPermission access) { |
|
int GetFlagsForMemoryPermission(OS::MemoryPermission access) { |
|
int flags = MAP_PRIVATE | MAP_ANONYMOUS; |
|
if (access == OS::MemoryPermission::kNoAccess) { |
|
-#if !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX |
|
+#if !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX && !V8_OS_HAIKU |
|
flags |= MAP_NORESERVE; |
|
#endif // !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX |
|
#if V8_OS_QNX |
|
diff --git a/src/3rdparty/chromium/v8/src/interface-descriptors.h b/src/3rdparty/chromium/v8/src/interface-descriptors.h |
|
index cf841383b..7b9930d7c 100644 |
|
--- a/src/3rdparty/chromium/v8/src/interface-descriptors.h |
|
+++ b/src/3rdparty/chromium/v8/src/interface-descriptors.h |
|
@@ -327,8 +327,8 @@ constexpr int kMaxBuiltinRegisterParams = 5; |
|
CallInterfaceDescriptorData::kNoFlags; \ |
|
static constexpr int kReturnCount = return_count; \ |
|
enum ParameterIndices { \ |
|
- __dummy = -1, /* to be able to pass zero arguments */ \ |
|
- ##__VA_ARGS__, \ |
|
+ __dummy = -1 __VA_OPT__(,) /* to be able to pass zero arguments */ \ |
|
+ __VA_ARGS__, \ |
|
\ |
|
kParameterCount, \ |
|
kContext = kParameterCount /* implicit parameter */ \ |
|
@@ -339,8 +339,8 @@ constexpr int kMaxBuiltinRegisterParams = 5; |
|
CallInterfaceDescriptorData::kNoContext; \ |
|
static constexpr int kReturnCount = return_count; \ |
|
enum ParameterIndices { \ |
|
- __dummy = -1, /* to be able to pass zero arguments */ \ |
|
- ##__VA_ARGS__, \ |
|
+ __dummy = -1 __VA_OPT__(,) /* to be able to pass zero arguments */ \ |
|
+ __VA_ARGS__, \ |
|
\ |
|
kParameterCount \ |
|
}; |
|
@@ -373,8 +373,8 @@ constexpr int kMaxBuiltinRegisterParams = 5; |
|
enum ParameterIndices { \ |
|
kTarget, \ |
|
kNewTarget, \ |
|
- kActualArgumentsCount, \ |
|
- ##__VA_ARGS__, \ |
|
+ kActualArgumentsCount __VA_OPT__(,) \ |
|
+ __VA_ARGS__, \ |
|
\ |
|
kParameterCount, \ |
|
kContext = kParameterCount /* implicit parameter */ \ |
|
diff --git a/src/3rdparty/chromium/v8/src/libsampler/sampler.cc b/src/3rdparty/chromium/v8/src/libsampler/sampler.cc |
|
index 492606475..0364627d4 100644 |
|
--- a/src/3rdparty/chromium/v8/src/libsampler/sampler.cc |
|
+++ b/src/3rdparty/chromium/v8/src/libsampler/sampler.cc |
|
@@ -13,7 +13,7 @@ |
|
#include <signal.h> |
|
#include <sys/time.h> |
|
|
|
-#if !V8_OS_QNX && !V8_OS_AIX |
|
+#if !V8_OS_QNX && !V8_OS_AIX && !V8_OS_HAIKU |
|
#include <sys/syscall.h> // NOLINT |
|
#endif |
|
|
|
@@ -21,7 +21,7 @@ |
|
#include <mach/mach.h> |
|
// OpenBSD doesn't have <ucontext.h>. ucontext_t lives in <signal.h> |
|
// and is a typedef for struct sigcontext. There is no uc_mcontext. |
|
-#elif(!V8_OS_ANDROID || defined(__BIONIC_HAVE_UCONTEXT_T)) && !V8_OS_OPENBSD |
|
+#elif(!V8_OS_ANDROID || defined(__BIONIC_HAVE_UCONTEXT_T)) && !V8_OS_OPENBSD && !V8_OS_HAIKU |
|
#include <ucontext.h> |
|
#endif |
|
|
|
@@ -215,7 +215,7 @@ void* ThreadKey(pthread_t thread_id) { |
|
|
|
// Returns hash value for hash map. |
|
uint32_t ThreadHash(pthread_t thread_id) { |
|
-#if V8_OS_BSD |
|
+#if V8_OS_BSD || V8_OS_HAIKU |
|
return static_cast<uint32_t>(reinterpret_cast<intptr_t>(thread_id)); |
|
#else |
|
return static_cast<uint32_t>(thread_id); |
|
@@ -592,7 +592,21 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { |
|
state->pc = reinterpret_cast<void*>(mcontext.jmp_context.iar); |
|
state->sp = reinterpret_cast<void*>(mcontext.jmp_context.gpr[1]); |
|
state->fp = reinterpret_cast<void*>(mcontext.jmp_context.gpr[31]); |
|
-#endif // V8_OS_AIX |
|
+#elif V8_OS_HAIKU |
|
+#if V8_HOST_ARCH_IA32 |
|
+ state->pc = reinterpret_cast<void*>(mcontext.eip); |
|
+ state->sp = reinterpret_cast<void*>(mcontext.esp); |
|
+ state->fp = reinterpret_cast<void*>(mcontext.ebp); |
|
+#elif V8_HOST_ARCH_X64 |
|
+ state->pc = reinterpret_cast<void*>(mcontext.rip); |
|
+ state->sp = reinterpret_cast<void*>(mcontext.rsp); |
|
+ state->fp = reinterpret_cast<void*>(mcontext.rbp); |
|
+#elif V8_HOST_ARCH_ARM |
|
+ state->pc = reinterpret_cast<void*>(mcontext.r15); |
|
+ state->sp = reinterpret_cast<void*>(mcontext.r13); |
|
+ state->fp = reinterpret_cast<void*>(mcontext.r11); |
|
+#endif // V8_HOST_ARCH_* |
|
+#endif // V8_OS_HAIKU |
|
} |
|
|
|
#endif // USE_SIGNALS |
|
-- |
|
2.21.0 |
|
|
Looked like the video showed some promising progress, I still hope it would work one day. Anyhow good luck!