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

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

Issue 8381001: Split GL binding init into core and extension part (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Use existing glext.h/wglext.h/glxext.h headers from Mesa. Created 9 years, 1 month 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
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 <vector> 5 #include <vector>
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 break; 168 break;
169 } 169 }
170 default: 170 default:
171 return false; 171 return false;
172 } 172 }
173 173
174 174
175 return true; 175 return true;
176 } 176 }
177 177
178 bool InitializeGLExtensionBindings(GLImplementation implementation,
179 GLContext* context) {
180 switch (implementation) {
181 case kGLImplementationOSMesaGL:
182 InitializeGLExtensionBindingsGL(context);
183 InitializeGLExtensionBindingsOSMESA(context);
184 break;
185 case kGLImplementationDesktopGL:
186 InitializeGLExtensionBindingsGL(context);
187 InitializeGLExtensionBindingsGLX(context);
188 break;
189 case kGLImplementationEGLGLES2:
190 InitializeGLExtensionBindingsGL(context);
191 InitializeGLExtensionBindingsEGL(context);
192 break;
193 case kGLImplementationMockGL:
194 InitializeGLExtensionBindingsGL(context);
195 break;
196 default:
197 return false;
198 }
199
200 return true;
201 }
202
178 void InitializeDebugGLBindings() { 203 void InitializeDebugGLBindings() {
179 InitializeDebugGLBindingsEGL(); 204 InitializeDebugGLBindingsEGL();
180 InitializeDebugGLBindingsGL(); 205 InitializeDebugGLBindingsGL();
181 #if !defined(USE_WAYLAND) 206 #if !defined(USE_WAYLAND)
182 InitializeDebugGLBindingsGLX(); 207 InitializeDebugGLBindingsGLX();
183 InitializeDebugGLBindingsOSMESA(); 208 InitializeDebugGLBindingsOSMESA();
184 #endif 209 #endif
185 } 210 }
186 211
187 } // namespace gfx 212 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698