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

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

Issue 7980034: Make OSMesa GL implementation advertise supported functionality as ES2 extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/gl_implementation.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/gl/gl_implementation.h" 5 #include "ui/gfx/gl/gl_implementation.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 void SetGLImplementation(GLImplementation implementation) { 101 void SetGLImplementation(GLImplementation implementation) {
102 g_gl_implementation = implementation; 102 g_gl_implementation = implementation;
103 } 103 }
104 104
105 GLImplementation GetGLImplementation() { 105 GLImplementation GetGLImplementation() {
106 return g_gl_implementation; 106 return g_gl_implementation;
107 } 107 }
108 108
109 bool HasDesktopGLFeatures() {
110 return kGLImplementationDesktopGL == g_gl_implementation ||
111 kGLImplementationOSMesaGL == g_gl_implementation;
112 }
113
109 void AddGLNativeLibrary(base::NativeLibrary library) { 114 void AddGLNativeLibrary(base::NativeLibrary library) {
110 DCHECK(library); 115 DCHECK(library);
111 116
112 if (!g_libraries) { 117 if (!g_libraries) {
113 g_libraries = new LibraryArray; 118 g_libraries = new LibraryArray;
114 base::AtExitManager::RegisterCallback(CleanupNativeLibraries, NULL); 119 base::AtExitManager::RegisterCallback(CleanupNativeLibraries, NULL);
115 } 120 }
116 121
117 g_libraries->push_back(library); 122 g_libraries->push_back(library);
118 } 123 }
(...skipping 18 matching lines...) Expand all
137 if (g_get_proc_address) { 142 if (g_get_proc_address) {
138 void* proc = g_get_proc_address(name); 143 void* proc = g_get_proc_address(name);
139 if (proc) 144 if (proc)
140 return proc; 145 return proc;
141 } 146 }
142 147
143 return NULL; 148 return NULL;
144 } 149 }
145 150
146 } // namespace gfx 151 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_implementation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698