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

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: Added dependencies to gl.gyp. Used NOT_REACHED() instead of DCHECK(0). 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
« no previous file with comments | « ui/gfx/gl/gl_implementation.cc ('k') | ui/gfx/gl/gl_implementation_mac.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) 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 break; 172 break;
173 } 173 }
174 default: 174 default:
175 return false; 175 return false;
176 } 176 }
177 177
178 178
179 return true; 179 return true;
180 } 180 }
181 181
182 bool InitializeGLExtensionBindings(GLImplementation implementation,
183 GLContext* context) {
184 switch (implementation) {
185 case kGLImplementationOSMesaGL:
186 InitializeGLExtensionBindingsGL(context);
187 InitializeGLExtensionBindingsOSMESA(context);
188 break;
189 case kGLImplementationDesktopGL:
190 InitializeGLExtensionBindingsGL(context);
191 InitializeGLExtensionBindingsGLX(context);
192 break;
193 case kGLImplementationEGLGLES2:
194 InitializeGLExtensionBindingsGL(context);
195 InitializeGLExtensionBindingsEGL(context);
196 break;
197 case kGLImplementationMockGL:
198 InitializeGLExtensionBindingsGL(context);
199 break;
200 default:
201 return false;
202 }
203
204 return true;
205 }
206
182 void InitializeDebugGLBindings() { 207 void InitializeDebugGLBindings() {
183 InitializeDebugGLBindingsEGL(); 208 InitializeDebugGLBindingsEGL();
184 InitializeDebugGLBindingsGL(); 209 InitializeDebugGLBindingsGL();
185 #if !defined(USE_WAYLAND) 210 #if !defined(USE_WAYLAND)
186 InitializeDebugGLBindingsGLX(); 211 InitializeDebugGLBindingsGLX();
187 InitializeDebugGLBindingsOSMESA(); 212 InitializeDebugGLBindingsOSMESA();
188 #endif 213 #endif
189 } 214 }
190 215
191 } // namespace gfx 216 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_implementation.cc ('k') | ui/gfx/gl/gl_implementation_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698