| 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/native_library.h" | 9 #include "base/native_library.h" |
| 10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 return true; | 94 return true; |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool InitializeDynamicGLBindings(GLImplementation implementation, | 97 bool InitializeDynamicGLBindings(GLImplementation implementation, |
| 98 GLContext* context) { | 98 GLContext* context) { |
| 99 switch (implementation) { | 99 switch (implementation) { |
| 100 case kGLImplementationEGLGLES2: | 100 case kGLImplementationEGLGLES2: |
| 101 InitializeDynamicGLBindingsGL(context); | 101 InitializeDynamicGLBindingsGL(context); |
| 102 InitializeDynamicGLBindingsEGL(context); |
| 103 break; |
| 104 case kGLImplementationOSMesaGL: |
| 105 InitializeDynamicGLBindingsGL(context); |
| 106 InitializeDynamicGLBindingsOSMESA(context); |
| 102 break; | 107 break; |
| 103 case kGLImplementationMockGL: | 108 case kGLImplementationMockGL: |
| 104 if (!context) { | 109 if (!context) { |
| 105 scoped_refptr<GLContextStubWithExtensions> mock_context( | 110 scoped_refptr<GLContextStubWithExtensions> mock_context( |
| 106 new GLContextStubWithExtensions()); | 111 new GLContextStubWithExtensions()); |
| 107 mock_context->SetGLVersionString("opengl es 3.0"); | 112 mock_context->SetGLVersionString("opengl es 3.0"); |
| 108 InitializeDynamicGLBindingsGL(mock_context.get()); | 113 InitializeDynamicGLBindingsGL(mock_context.get()); |
| 109 } else | 114 } else |
| 110 InitializeDynamicGLBindingsGL(context); | 115 InitializeDynamicGLBindingsGL(context); |
| 111 break; | 116 break; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 136 switch (GetGLImplementation()) { | 141 switch (GetGLImplementation()) { |
| 137 case kGLImplementationEGLGLES2: | 142 case kGLImplementationEGLGLES2: |
| 138 return GetGLWindowSystemBindingInfoEGL(info); | 143 return GetGLWindowSystemBindingInfoEGL(info); |
| 139 default: | 144 default: |
| 140 return false; | 145 return false; |
| 141 } | 146 } |
| 142 return false; | 147 return false; |
| 143 } | 148 } |
| 144 | 149 |
| 145 } // namespace gfx | 150 } // namespace gfx |
| OLD | NEW |