| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
| 10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 | 145 |
| 146 | 146 |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool InitializeDynamicGLBindings(GLImplementation implementation, | 150 bool InitializeDynamicGLBindings(GLImplementation implementation, |
| 151 GLContext* context) { | 151 GLContext* context) { |
| 152 switch (implementation) { | 152 switch (implementation) { |
| 153 case kGLImplementationOSMesaGL: | 153 case kGLImplementationOSMesaGL: |
| 154 case kGLImplementationDesktopGL: | 154 InitializeDynamicGLBindingsGL(context); |
| 155 InitializeDynamicGLBindingsOSMESA(context); |
| 156 break; |
| 157 case kGLImplementationDesktopGL: |
| 158 InitializeDynamicGLBindingsGL(context); |
| 159 InitializeDynamicGLBindingsGLX(context); |
| 160 break; |
| 155 case kGLImplementationEGLGLES2: | 161 case kGLImplementationEGLGLES2: |
| 156 InitializeDynamicGLBindingsGL(context); | 162 InitializeDynamicGLBindingsGL(context); |
| 163 InitializeDynamicGLBindingsEGL(context); |
| 157 break; | 164 break; |
| 158 case kGLImplementationMockGL: | 165 case kGLImplementationMockGL: |
| 159 if (!context) { | 166 if (!context) { |
| 160 scoped_refptr<GLContextStubWithExtensions> mock_context( | 167 scoped_refptr<GLContextStubWithExtensions> mock_context( |
| 161 new GLContextStubWithExtensions()); | 168 new GLContextStubWithExtensions()); |
| 162 mock_context->SetGLVersionString("3.0"); | 169 mock_context->SetGLVersionString("3.0"); |
| 163 InitializeDynamicGLBindingsGL(mock_context.get()); | 170 InitializeDynamicGLBindingsGL(mock_context.get()); |
| 164 } else | 171 } else |
| 165 InitializeDynamicGLBindingsGL(context); | 172 InitializeDynamicGLBindingsGL(context); |
| 166 break; | 173 break; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 194 return GetGLWindowSystemBindingInfoGLX(info); | 201 return GetGLWindowSystemBindingInfoGLX(info); |
| 195 case kGLImplementationEGLGLES2: | 202 case kGLImplementationEGLGLES2: |
| 196 return GetGLWindowSystemBindingInfoEGL(info); | 203 return GetGLWindowSystemBindingInfoEGL(info); |
| 197 default: | 204 default: |
| 198 return false; | 205 return false; |
| 199 } | 206 } |
| 200 return false; | 207 return false; |
| 201 } | 208 } |
| 202 | 209 |
| 203 } // namespace gfx | 210 } // namespace gfx |
| OLD | NEW |