Commit 82b8caf5 authored by Maggie Chen's avatar Maggie Chen Committed by Commit Bot

Don't launch the unsandboxed GPU process for headless chrome mode

DX12/Vulkan info collection is not needed for headless mode. Don't
launch the unsandboxed GPU process, which is only for info collection.

Bug: 1008904
Change-Id: Ibd0a58ab02675752e86282ef91e2b0b87935e256
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1981130Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727480}
parent 004b1b7f
...@@ -5,6 +5,7 @@ specific_include_rules = { ...@@ -5,6 +5,7 @@ specific_include_rules = {
"headless_content_main_delegate.cc": [ "headless_content_main_delegate.cc": [
"+cc/base/switches.h", "+cc/base/switches.h",
"+components/viz/common/switches.h", "+components/viz/common/switches.h",
"+gpu/config/gpu_switches.h",
], ],
"headless_web_contents_browsertest.cc": [ "headless_web_contents_browsertest.cc": [
"+cc/base/switches.h", "+cc/base/switches.h",
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "content/public/browser/browser_main_runner.h" #include "content/public/browser/browser_main_runner.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/profiling.h" #include "content/public/common/profiling.h"
#include "gpu/config/gpu_switches.h"
#include "headless/lib/browser/headless_browser_impl.h" #include "headless/lib/browser/headless_browser_impl.h"
#include "headless/lib/browser/headless_content_browser_client.h" #include "headless/lib/browser/headless_content_browser_client.h"
#include "headless/lib/headless_crash_reporter_client.h" #include "headless/lib/headless_crash_reporter_client.h"
...@@ -228,6 +229,11 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) { ...@@ -228,6 +229,11 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) {
// is ready for display (because it isn't displayed to users). // is ready for display (because it isn't displayed to users).
command_line->AppendSwitch(::switches::kAllowPreCommitInput); command_line->AppendSwitch(::switches::kAllowPreCommitInput);
#if defined(OS_WIN)
command_line->AppendSwitch(
::switches::kDisableGpuProcessForDX12VulkanInfoCollection);
#endif
content::Profiling::ProcessStarted(); content::Profiling::ProcessStarted();
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment