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

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

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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/gfx/text_elider_unittest.cc ('k') | ui/gl/gl_gl_api_implementation.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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 std::vector<std::string> exts; 94 std::vector<std::string> exts;
95 GLint num_extensions = 0; 95 GLint num_extensions = 0;
96 glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); 96 glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions);
97 for (GLint i = 0; i < num_extensions; ++i) { 97 for (GLint i = 0; i < num_extensions; ++i) {
98 const char* extension = reinterpret_cast<const char*>( 98 const char* extension = reinterpret_cast<const char*>(
99 glGetStringi(GL_EXTENSIONS, i)); 99 glGetStringi(GL_EXTENSIONS, i));
100 DCHECK(extension != nullptr); 100 DCHECK(extension != nullptr);
101 exts.push_back(extension); 101 exts.push_back(extension);
102 } 102 }
103 return JoinString(exts, " "); 103 return base::JoinString(exts, " ");
104 } 104 }
105 105
106 std::string GLContext::GetGLVersion() { 106 std::string GLContext::GetGLVersion() {
107 DCHECK(IsCurrent(nullptr)); 107 DCHECK(IsCurrent(nullptr));
108 const char *version = 108 const char *version =
109 reinterpret_cast<const char*>(glGetString(GL_VERSION)); 109 reinterpret_cast<const char*>(glGetString(GL_VERSION));
110 return std::string(version ? version : ""); 110 return std::string(version ? version : "");
111 } 111 }
112 112
113 std::string GLContext::GetGLRenderer() { 113 std::string GLContext::GetGLRenderer() {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 265 }
266 266
267 GLContextReal::~GLContextReal() {} 267 GLContextReal::~GLContextReal() {}
268 268
269 void GLContextReal::SetCurrent(GLSurface* surface) { 269 void GLContextReal::SetCurrent(GLSurface* surface) {
270 GLContext::SetCurrent(surface); 270 GLContext::SetCurrent(surface);
271 current_real_context_.Pointer()->Set(surface ? this : nullptr); 271 current_real_context_.Pointer()->Set(surface ? this : nullptr);
272 } 272 }
273 273
274 } // namespace gfx 274 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/text_elider_unittest.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698