| OLD | NEW |
| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 default: | 290 default: |
| 291 return false; | 291 return false; |
| 292 } | 292 } |
| 293 | 293 |
| 294 return true; | 294 return true; |
| 295 } | 295 } |
| 296 | 296 |
| 297 bool InitializeDynamicGLBindings(GLImplementation implementation, | 297 bool InitializeDynamicGLBindings(GLImplementation implementation, |
| 298 GLContext* context) { | 298 GLContext* context) { |
| 299 switch (implementation) { | 299 switch (implementation) { |
| 300 case kGLImplementationEGLGLES2: |
| 301 InitializeDynamicGLBindingsEGL(context); |
| 302 // Intentionally fall through to also initialize Dynamic GL Bindings. |
| 300 case kGLImplementationOSMesaGL: | 303 case kGLImplementationOSMesaGL: |
| 301 case kGLImplementationEGLGLES2: | |
| 302 case kGLImplementationDesktopGL: | 304 case kGLImplementationDesktopGL: |
| 303 InitializeDynamicGLBindingsGL(context); | 305 InitializeDynamicGLBindingsGL(context); |
| 304 break; | 306 break; |
| 305 case kGLImplementationMockGL: | 307 case kGLImplementationMockGL: |
| 306 if (!context) { | 308 if (!context) { |
| 307 scoped_refptr<GLContextStubWithExtensions> mock_context( | 309 scoped_refptr<GLContextStubWithExtensions> mock_context( |
| 308 new GLContextStubWithExtensions()); | 310 new GLContextStubWithExtensions()); |
| 309 mock_context->SetGLVersionString("3.0"); | 311 mock_context->SetGLVersionString("3.0"); |
| 310 InitializeDynamicGLBindingsGL(mock_context.get()); | 312 InitializeDynamicGLBindingsGL(mock_context.get()); |
| 311 } else | 313 } else |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 case kGLImplementationDesktopGL: | 346 case kGLImplementationDesktopGL: |
| 345 return GetGLWindowSystemBindingInfoWGL(info); | 347 return GetGLWindowSystemBindingInfoWGL(info); |
| 346 case kGLImplementationEGLGLES2: | 348 case kGLImplementationEGLGLES2: |
| 347 return GetGLWindowSystemBindingInfoEGL(info); | 349 return GetGLWindowSystemBindingInfoEGL(info); |
| 348 default: | 350 default: |
| 349 return false; | 351 return false; |
| 350 } | 352 } |
| 351 } | 353 } |
| 352 | 354 |
| 353 } // namespace gfx | 355 } // namespace gfx |
| OLD | NEW |