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

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

Issue 2014223002: Follow-up fixes to changing namespace gfx to gl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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_image_surface_texture.cc ('k') | ui/gl/gl_surface.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 "ui/gl/gl_implementation.h" 5 #include "ui/gl/gl_implementation.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 exts.push_back(extension); 199 exts.push_back(extension);
200 } 200 }
201 return base::JoinString(exts, " "); 201 return base::JoinString(exts, " ");
202 } 202 }
203 203
204 bool WillUseGLGetStringForExtensions() { 204 bool WillUseGLGetStringForExtensions() {
205 const char* version_str = 205 const char* version_str =
206 reinterpret_cast<const char*>(glGetString(GL_VERSION)); 206 reinterpret_cast<const char*>(glGetString(GL_VERSION));
207 unsigned major_version, minor_version; 207 unsigned major_version, minor_version;
208 bool is_es, is_es2, is_es3; 208 bool is_es, is_es2, is_es3;
209 gl::GLVersionInfo::ParseVersionString( 209 GLVersionInfo::ParseVersionString(version_str, &major_version, &minor_version,
210 version_str, &major_version, &minor_version, &is_es, &is_es2, &is_es3); 210 &is_es, &is_es2, &is_es3);
211 return is_es || major_version < 3; 211 return is_es || major_version < 3;
212 } 212 }
213 213
214 base::NativeLibrary LoadLibraryAndPrintError( 214 base::NativeLibrary LoadLibraryAndPrintError(
215 const base::FilePath::CharType* filename) { 215 const base::FilePath::CharType* filename) {
216 return LoadLibraryAndPrintError(base::FilePath(filename)); 216 return LoadLibraryAndPrintError(base::FilePath(filename));
217 } 217 }
218 218
219 base::NativeLibrary LoadLibraryAndPrintError(const base::FilePath& filename) { 219 base::NativeLibrary LoadLibraryAndPrintError(const base::FilePath& filename) {
220 base::NativeLibraryLoadError error; 220 base::NativeLibraryLoadError error;
221 base::NativeLibrary library = base::LoadNativeLibrary(filename, &error); 221 base::NativeLibrary library = base::LoadNativeLibrary(filename, &error);
222 if (!library) { 222 if (!library) {
223 LOG(ERROR) << "Failed to load " << filename.MaybeAsASCII() << ": " 223 LOG(ERROR) << "Failed to load " << filename.MaybeAsASCII() << ": "
224 << error.ToString(); 224 << error.ToString();
225 return NULL; 225 return NULL;
226 } 226 }
227 return library; 227 return library;
228 } 228 }
229 229
230 } // namespace gl 230 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_image_surface_texture.cc ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698