mirror of
https://git.freebsd.org/ports.git
synced 2025-06-01 19:06:28 -04:00
Finally, after a long wait, an electron port for FreeBSD lands in the portstree. A huge thanks to everyone contributed to this huge effort and to the maintainer that is willing to take the burden of the maintainership!
56 lines
2 KiB
C++
56 lines
2 KiB
C++
--- content/renderer/render_thread_impl.cc.orig 2019-04-06 12:09:25 UTC
|
|
+++ content/renderer/render_thread_impl.cc
|
|
@@ -198,12 +198,21 @@
|
|
#include "mojo/public/cpp/bindings/message_dumper.h"
|
|
#endif
|
|
|
|
+#if !defined(OS_BSD)
|
|
#if defined(OS_MACOSX)
|
|
#include <malloc/malloc.h>
|
|
#else
|
|
#include <malloc.h>
|
|
#endif
|
|
+#endif
|
|
|
|
+#if defined(OS_BSD)
|
|
+#include <stddef.h>
|
|
+#include <stdint.h>
|
|
+#include <sys/param.h>
|
|
+#include <sys/sysctl.h>
|
|
+#endif
|
|
+
|
|
using base::ThreadRestrictions;
|
|
using blink::WebDocument;
|
|
using blink::WebFrame;
|
|
@@ -977,7 +986,7 @@ void RenderThreadImpl::Init(
|
|
DCHECK(parsed_num_raster_threads) << string_value;
|
|
DCHECK_GT(num_raster_threads, 0);
|
|
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
categorized_worker_pool_->SetBackgroundingCallback(
|
|
main_thread_scheduler_->DefaultTaskRunner(),
|
|
base::BindOnce(
|
|
@@ -1018,7 +1027,7 @@ void RenderThreadImpl::Init(
|
|
GetConnector()->BindInterface(mojom::kBrowserServiceName,
|
|
mojo::MakeRequest(&storage_partition_service_));
|
|
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
render_message_filter()->SetThreadPriority(
|
|
ChildProcess::current()->io_thread_id(), base::ThreadPriority::DISPLAY);
|
|
#endif
|
|
@@ -1448,11 +1457,11 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl:
|
|
gpu::kGpuFeatureStatusEnabled);
|
|
const bool enable_gpu_memory_buffers =
|
|
!is_gpu_compositing_disabled_ &&
|
|
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN)
|
|
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
|
|
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
|
|
#else
|
|
cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames);
|
|
-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN)
|
|
+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
|
|
const bool enable_media_stream_gpu_memory_buffers =
|
|
enable_gpu_memory_buffers &&
|
|
base::FeatureList::IsEnabled(
|