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

Side by Side Diff: ui/gl/init/gl_factory.cc

Issue 2230183002: ui: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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_gl_api_implementation.cc ('k') | ui/message_center/message_center_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/gl/init/gl_factory.h" 5 #include "ui/gl/init/gl_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 25 matching lines...) Expand all
36 std::string requested_implementation_name = 36 std::string requested_implementation_name =
37 cmd->GetSwitchValueASCII(switches::kUseGL); 37 cmd->GetSwitchValueASCII(switches::kUseGL);
38 if (requested_implementation_name == "any") { 38 if (requested_implementation_name == "any") {
39 fallback_to_osmesa = true; 39 fallback_to_osmesa = true;
40 } else if (requested_implementation_name == 40 } else if (requested_implementation_name ==
41 kGLImplementationSwiftShaderName || 41 kGLImplementationSwiftShaderName ||
42 requested_implementation_name == kGLImplementationANGLEName) { 42 requested_implementation_name == kGLImplementationANGLEName) {
43 impl = kGLImplementationEGLGLES2; 43 impl = kGLImplementationEGLGLES2;
44 } else { 44 } else {
45 impl = GetNamedGLImplementation(requested_implementation_name); 45 impl = GetNamedGLImplementation(requested_implementation_name);
46 if (!ContainsValue(allowed_impls, impl)) { 46 if (!base::ContainsValue(allowed_impls, impl)) {
47 LOG(ERROR) << "Requested GL implementation is not available."; 47 LOG(ERROR) << "Requested GL implementation is not available.";
48 return false; 48 return false;
49 } 49 }
50 } 50 }
51 } 51 }
52 52
53 bool gpu_service_logging = cmd->HasSwitch(switches::kEnableGPUServiceLogging); 53 bool gpu_service_logging = cmd->HasSwitch(switches::kEnableGPUServiceLogging);
54 bool disable_gl_drawing = cmd->HasSwitch(switches::kDisableGLDrawingForTests); 54 bool disable_gl_drawing = cmd->HasSwitch(switches::kDisableGLDrawingForTests);
55 55
56 return InitializeGLOneOffImplementation( 56 return InitializeGLOneOffImplementation(
(...skipping 27 matching lines...) Expand all
84 84
85 void ClearGLBindings() { 85 void ClearGLBindings() {
86 ClearGLBindingsPlatform(); 86 ClearGLBindingsPlatform();
87 87
88 SetGLImplementation(kGLImplementationNone); 88 SetGLImplementation(kGLImplementationNone);
89 UnloadGLNativeLibraries(); 89 UnloadGLNativeLibraries();
90 } 90 }
91 91
92 } // namespace init 92 } // namespace init
93 } // namespace gl 93 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698