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

Side by Side Diff: ui/gl/gl_implementation_x11.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 5 years, 12 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
« no previous file with comments | « ui/gl/gl_implementation_win.cc ('k') | ui/gl/gl_surface.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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "ui/gl/gl_bindings.h" 10 #include "ui/gl/gl_bindings.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // after instituting restrictions on I/O. Going forward they will 58 // after instituting restrictions on I/O. Going forward they will
59 // likely be used in the browser process on most platforms. The 59 // likely be used in the browser process on most platforms. The
60 // one-time initialization cost is small, between 2 and 5 ms. 60 // one-time initialization cost is small, between 2 and 5 ms.
61 base::ThreadRestrictions::ScopedAllowIO allow_io; 61 base::ThreadRestrictions::ScopedAllowIO allow_io;
62 62
63 switch (implementation) { 63 switch (implementation) {
64 case kGLImplementationOSMesaGL: 64 case kGLImplementationOSMesaGL:
65 return InitializeStaticGLBindingsOSMesaGL(); 65 return InitializeStaticGLBindingsOSMesaGL();
66 case kGLImplementationDesktopGL: { 66 case kGLImplementationDesktopGL: {
67 base::NativeLibrary library = NULL; 67 base::NativeLibrary library = NULL;
68 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 68 const base::CommandLine* command_line =
69 base::CommandLine::ForCurrentProcess();
69 70
70 if (command_line->HasSwitch(switches::kTestGLLib)) 71 if (command_line->HasSwitch(switches::kTestGLLib))
71 library = LoadLibraryAndPrintError( 72 library = LoadLibraryAndPrintError(
72 command_line->GetSwitchValueASCII(switches::kTestGLLib).c_str()); 73 command_line->GetSwitchValueASCII(switches::kTestGLLib).c_str());
73 74
74 if (!library) { 75 if (!library) {
75 library = LoadLibraryAndPrintError(kGLLibraryName); 76 library = LoadLibraryAndPrintError(kGLLibraryName);
76 } 77 }
77 78
78 if (!library) 79 if (!library)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return GetGLWindowSystemBindingInfoGLX(info); 201 return GetGLWindowSystemBindingInfoGLX(info);
201 case kGLImplementationEGLGLES2: 202 case kGLImplementationEGLGLES2:
202 return GetGLWindowSystemBindingInfoEGL(info); 203 return GetGLWindowSystemBindingInfoEGL(info);
203 default: 204 default:
204 return false; 205 return false;
205 } 206 }
206 return false; 207 return false;
207 } 208 }
208 209
209 } // namespace gfx 210 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_implementation_win.cc ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698