OLD | NEW |
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 Loading... |
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 |
OLD | NEW |