Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Side by Side Diff: content/gpu/gpu_main.cc

Issue 65193003: Clear SingleProcess and InProcessGPU logic. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: --in-process-gpu is not supported in chrome multiple dll browser. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <dwmapi.h> 8 #include <dwmapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 base::debug::TraceLog::GetInstance()->SetProcessSortIndex( 92 base::debug::TraceLog::GetInstance()->SetProcessSortIndex(
93 kTraceEventGpuProcessSortIndex); 93 kTraceEventGpuProcessSortIndex);
94 94
95 const CommandLine& command_line = parameters.command_line; 95 const CommandLine& command_line = parameters.command_line;
96 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { 96 if (command_line.HasSwitch(switches::kGpuStartupDialog)) {
97 ChildProcess::WaitForDebugger("Gpu"); 97 ChildProcess::WaitForDebugger("Gpu");
98 } 98 }
99 99
100 base::Time start_time = base::Time::Now(); 100 base::Time start_time = base::Time::Now();
101 101
102 bool in_browser_process = command_line.HasSwitch(switches::kSingleProcess) ||
103 command_line.HasSwitch(switches::kInProcessGPU);
104
105 if (!in_browser_process) {
106 #if defined(OS_WIN) 102 #if defined(OS_WIN)
107 // Prevent Windows from displaying a modal dialog on failures like not being 103 // Prevent Windows from displaying a modal dialog on failures like not being
108 // able to load a DLL. 104 // able to load a DLL.
109 SetErrorMode( 105 SetErrorMode(
110 SEM_FAILCRITICALERRORS | 106 SEM_FAILCRITICALERRORS |
111 SEM_NOGPFAULTERRORBOX | 107 SEM_NOGPFAULTERRORBOX |
112 SEM_NOOPENFILEERRORBOX); 108 SEM_NOOPENFILEERRORBOX);
113 #elif defined(USE_X11) 109 #elif defined(USE_X11)
114 ui::SetDefaultX11ErrorHandlers(); 110 ui::SetDefaultX11ErrorHandlers();
115 #endif 111 #endif
116 112
117 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); 113 logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
118 }
119 114
120 if (command_line.HasSwitch(switches::kSupportsDualGpus)) { 115 if (command_line.HasSwitch(switches::kSupportsDualGpus)) {
121 std::string types = command_line.GetSwitchValueASCII( 116 std::string types = command_line.GetSwitchValueASCII(
122 switches::kGpuDriverBugWorkarounds); 117 switches::kGpuDriverBugWorkarounds);
123 std::set<int> workarounds; 118 std::set<int> workarounds;
124 gpu::StringToFeatureSet(types, &workarounds); 119 gpu::StringToFeatureSet(types, &workarounds);
125 if (workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1) 120 if (workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1)
126 ui::GpuSwitchingManager::GetInstance()->ForceUseOfDiscreteGpu(); 121 ui::GpuSwitchingManager::GetInstance()->ForceUseOfDiscreteGpu();
127 else if (workarounds.count(gpu::FORCE_INTEGRATED_GPU) == 1) 122 else if (workarounds.count(gpu::FORCE_INTEGRATED_GPU) == 1)
128 ui::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu(); 123 ui::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu();
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 return true; 447 return true;
453 } 448 }
454 449
455 return false; 450 return false;
456 } 451 }
457 #endif // defined(OS_WIN) 452 #endif // defined(OS_WIN)
458 453
459 } // namespace. 454 } // namespace.
460 455
461 } // namespace content 456 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/utility_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698