2019-04-30 16:45:48 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Milan Burda <milan.burda@gmail.com>
|
|
|
|
Date: Thu, 11 Apr 2019 14:49:20 +0200
|
2019-08-24 01:14:23 +00:00
|
|
|
Subject: add_contentgpuclient_precreatemessageloop_callback.patch
|
2019-04-30 16:45:48 +00:00
|
|
|
|
2019-08-24 01:14:23 +00:00
|
|
|
This adds a ContentGpuClient::PreCreateMessageLoop() callback.
|
2019-04-30 16:45:48 +00:00
|
|
|
Invoke in GpuMain after SetErrorMode, before starting the message loop.
|
|
|
|
Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
|
|
|
|
2019-08-24 01:14:23 +00:00
|
|
|
This should be upstreamed.
|
2019-04-30 16:45:48 +00:00
|
|
|
|
|
|
|
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
2020-11-14 00:16:56 +00:00
|
|
|
index 70b4ac882ed335c1e623f4cbb6d2c1dc5aca4caa..7e9972660b4006d4f83b2cd812f084fd8a2fe289 100644
|
2019-04-30 16:45:48 +00:00
|
|
|
--- a/content/gpu/gpu_main.cc
|
|
|
|
+++ b/content/gpu/gpu_main.cc
|
2020-11-14 00:16:56 +00:00
|
|
|
@@ -260,6 +260,10 @@ int GpuMain(const MainFunctionParams& parameters) {
|
2020-04-13 23:39:26 +00:00
|
|
|
// to the GpuProcessHost once the GpuServiceImpl has started.
|
|
|
|
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
2019-04-30 16:45:48 +00:00
|
|
|
|
|
|
|
+ auto* client = GetContentClient()->gpu();
|
|
|
|
+ if (client)
|
|
|
|
+ client->PreCreateMessageLoop();
|
|
|
|
+
|
|
|
|
// We are experiencing what appear to be memory-stomp issues in the GPU
|
2019-07-03 01:22:09 +00:00
|
|
|
// process. These issues seem to be impacting the task executor and listeners
|
|
|
|
// registered to it. Create the task executor on the heap to guard against
|
2020-11-14 00:16:56 +00:00
|
|
|
@@ -397,7 +401,6 @@ int GpuMain(const MainFunctionParams& parameters) {
|
2020-05-26 20:06:26 +00:00
|
|
|
}
|
2019-07-24 22:58:51 +00:00
|
|
|
#endif
|
2019-04-30 16:45:48 +00:00
|
|
|
|
|
|
|
- auto* client = GetContentClient()->gpu();
|
|
|
|
if (client)
|
|
|
|
client->PostIOThreadCreated(gpu_process.io_task_runner());
|
|
|
|
|
|
|
|
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
|
2020-10-16 01:30:41 +00:00
|
|
|
index 2231ce937692f567fd2d4661e4feea389e12203e..a281c7bd40dac0acf350d08683e7c71282a83e9a 100644
|
2019-04-30 16:45:48 +00:00
|
|
|
--- a/content/public/gpu/content_gpu_client.h
|
|
|
|
+++ b/content/public/gpu/content_gpu_client.h
|
2020-10-16 01:30:41 +00:00
|
|
|
@@ -31,6 +31,10 @@ class CONTENT_EXPORT ContentGpuClient {
|
2019-04-30 16:45:48 +00:00
|
|
|
public:
|
|
|
|
virtual ~ContentGpuClient() {}
|
|
|
|
|
|
|
|
+ // Allows the embedder to perform platform-specific initialization before
|
|
|
|
+ // creating the message loop.
|
|
|
|
+ virtual void PreCreateMessageLoop() {}
|
|
|
|
+
|
2019-12-11 00:22:35 +00:00
|
|
|
// Called during initialization once the GpuService has been initialized.
|
|
|
|
virtual void GpuServiceInitialized() {}
|
|
|
|
|