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

Side by Side Diff: content/shell/shell_main_delegate.cc

Issue 13983014: [CLOSED] Cleaning up the plethora of switches for GPU vs software vs SwiftShader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget.cc ('k') | ui/compositor/compositor_switches.h » ('j') | 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 "content/shell/shell_main_delegate.h" 5 #include "content/shell/shell_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // WebKitTestPlatformInitialize() are called. 99 // WebKitTestPlatformInitialize() are called.
100 OverrideFrameworkBundlePath(); 100 OverrideFrameworkBundlePath();
101 OverrideChildProcessPath(); 101 OverrideChildProcessPath();
102 #endif // OS_MACOSX 102 #endif // OS_MACOSX
103 103
104 InitLogging(); 104 InitLogging();
105 CommandLine& command_line = *CommandLine::ForCurrentProcess(); 105 CommandLine& command_line = *CommandLine::ForCurrentProcess();
106 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 106 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
107 command_line.AppendSwitch(switches::kProcessPerTab); 107 command_line.AppendSwitch(switches::kProcessPerTab);
108 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); 108 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
109 command_line.AppendSwitchASCII(
110 switches::kUseGL, gfx::kGLImplementationOSMesaName);
111 SetAllowOSMesaImageTransportForTesting();
112 command_line.AppendSwitch(switches::kSkipGpuDataLoading); 109 command_line.AppendSwitch(switches::kSkipGpuDataLoading);
113 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); 110 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures);
114 command_line.AppendSwitch(switches::kEnableCssShaders);
115 command_line.AppendSwitchASCII(switches::kTouchEvents, 111 command_line.AppendSwitchASCII(switches::kTouchEvents,
116 switches::kTouchEventsEnabled); 112 switches::kTouchEventsEnabled);
117 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) 113 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) {
118 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); 114 command_line.AppendSwitch(switches::kDisableGpu);
115 } else {
116 SetAllowOSMesaImageTransportForTesting();
117 command_line.AppendSwitchASCII(
118 switches::kUseGL, gfx::kGLImplementationOSMesaName);
119 command_line.AppendSwitch(switches::kEnableCssShaders);
120 }
119 121
120 net::CookieMonster::EnableFileScheme(); 122 net::CookieMonster::EnableFileScheme();
121 if (!WebKitTestPlatformInitialize()) { 123 if (!WebKitTestPlatformInitialize()) {
122 if (exit_code) 124 if (exit_code)
123 *exit_code = 1; 125 *exit_code = 1;
124 return true; 126 return true;
125 } 127 }
126 } 128 }
127 SetContentClient(&content_client_); 129 SetContentClient(&content_client_);
128 return false; 130 return false;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 browser_client_.reset(new ShellContentBrowserClient); 191 browser_client_.reset(new ShellContentBrowserClient);
190 return browser_client_.get(); 192 return browser_client_.get();
191 } 193 }
192 194
193 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 195 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
194 renderer_client_.reset(new ShellContentRendererClient); 196 renderer_client_.reset(new ShellContentRendererClient);
195 return renderer_client_.get(); 197 return renderer_client_.get();
196 } 198 }
197 199
198 } // namespace content 200 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698