aboutsummaryrefslogtreecommitdiff
path: root/devel/electron13/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron13/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc')
-rw-r--r--devel/electron13/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc47
1 files changed, 47 insertions, 0 deletions
diff --git a/devel/electron13/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc b/devel/electron13/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc
new file mode 100644
index 000000000000..b4ea655309fb
--- /dev/null
+++ b/devel/electron13/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc
@@ -0,0 +1,47 @@
+--- gpu/ipc/service/gpu_watchdog_thread.cc.orig 2021-04-14 01:08:50 UTC
++++ gpu/ipc/service/gpu_watchdog_thread.cc
+@@ -73,7 +73,7 @@ GpuWatchdogThread::GpuWatchdogThread(base::TimeDelta t
+ }
+ #endif
+
+-#if defined(USE_X11)
++#if defined(USE_X11) && !defined(OS_BSD)
+ tty_file_ = base::OpenFile(
+ base::FilePath(FILE_PATH_LITERAL("/sys/class/tty/tty0/active")), "r");
+ UpdateActiveTTY();
+@@ -101,7 +101,7 @@ GpuWatchdogThread::~GpuWatchdogThread() {
+ CloseHandle(watched_thread_handle_);
+ #endif
+
+-#if defined(USE_X11)
++#if defined(USE_X11) && !defined(OS_BSD)
+ if (tty_file_)
+ fclose(tty_file_);
+ #endif
+@@ -440,7 +440,7 @@ void GpuWatchdogThread::OnWatchdogTimeout() {
+ if (foregrounded_event_)
+ num_of_timeout_after_foregrounded_++;
+
+-#if defined(USE_X11)
++#if defined(USE_X11) && !defined(OS_BSD)
+ UpdateActiveTTY();
+ #endif
+
+@@ -773,7 +773,7 @@ bool GpuWatchdogThread::WithinOneMinFromForegrounded()
+ return foregrounded_event_ && num_of_timeout_after_foregrounded_ <= count;
+ }
+
+-#if defined(USE_X11)
++#if defined(USE_X11) && !defined(OS_BSD)
+ void GpuWatchdogThread::UpdateActiveTTY() {
+ last_active_tty_ = active_tty_;
+
+@@ -790,7 +790,7 @@ void GpuWatchdogThread::UpdateActiveTTY() {
+ #endif
+
+ bool GpuWatchdogThread::ContinueOnNonHostX11ServerTty() {
+-#if defined(USE_X11)
++#if defined(USE_X11) && !defined(OS_BSD)
+ if (host_tty_ == -1 || active_tty_ == -1)
+ return false;
+