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

Side by Side Diff: ui/gl/gl_implementation_win.cc

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/gl/gl_implementation_x11.cc » ('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 <vector> 5 #include <vector>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (!PathService::Get(base::DIR_MODULE, &module_path)) 155 if (!PathService::Get(base::DIR_MODULE, &module_path))
156 return false; 156 return false;
157 157
158 // Attempt to load the D3DX shader compiler using the default search path 158 // Attempt to load the D3DX shader compiler using the default search path
159 // and if that fails, using an absolute path. This is to ensure these DLLs 159 // and if that fails, using an absolute path. This is to ensure these DLLs
160 // are loaded before ANGLE is loaded in case they are not in the default 160 // are loaded before ANGLE is loaded in case they are not in the default
161 // search path. 161 // search path.
162 LoadD3DXLibrary(module_path, kD3DCompiler); 162 LoadD3DXLibrary(module_path, kD3DCompiler);
163 163
164 base::FilePath gles_path; 164 base::FilePath gles_path;
165 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 165 const base::CommandLine* command_line =
166 base::CommandLine::ForCurrentProcess();
166 bool using_swift_shader = 167 bool using_swift_shader =
167 command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"; 168 command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader";
168 if (using_swift_shader) { 169 if (using_swift_shader) {
169 if (!command_line->HasSwitch(switches::kSwiftShaderPath)) 170 if (!command_line->HasSwitch(switches::kSwiftShaderPath))
170 return false; 171 return false;
171 gles_path = 172 gles_path =
172 command_line->GetSwitchValuePath(switches::kSwiftShaderPath); 173 command_line->GetSwitchValuePath(switches::kSwiftShaderPath);
173 // Preload library 174 // Preload library
174 LoadLibrary(L"ddraw.dll"); 175 LoadLibrary(L"ddraw.dll");
175 } else { 176 } else {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 case kGLImplementationDesktopGL: 368 case kGLImplementationDesktopGL:
368 return GetGLWindowSystemBindingInfoWGL(info); 369 return GetGLWindowSystemBindingInfoWGL(info);
369 case kGLImplementationEGLGLES2: 370 case kGLImplementationEGLGLES2:
370 return GetGLWindowSystemBindingInfoEGL(info); 371 return GetGLWindowSystemBindingInfoEGL(info);
371 default: 372 default:
372 return false; 373 return false;
373 } 374 }
374 } 375 }
375 376
376 } // namespace gfx 377 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/gl/gl_implementation_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698