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 InitializeDynamicGLBindingsGL(context); | 154 case kGLImplementationDesktopGL: |
155 InitializeDynamicGLBindingsOSMESA(context); | |
156 break; | |
157 case kGLImplementationDesktopGL: | |
158 InitializeDynamicGLBindingsGL(context); | |
159 InitializeDynamicGLBindingsGLX(context); | |
160 break; | |
161 case kGLImplementationEGLGLES2: | 155 case kGLImplementationEGLGLES2: |
162 InitializeDynamicGLBindingsGL(context); | 156 InitializeDynamicGLBindingsGL(context); |
163 InitializeDynamicGLBindingsEGL(context); | |
164 break; | 157 break; |
165 case kGLImplementationMockGL: | 158 case kGLImplementationMockGL: |
166 if (!context) { | 159 if (!context) { |
167 scoped_refptr<GLContextStubWithExtensions> mock_context( | 160 scoped_refptr<GLContextStubWithExtensions> mock_context( |
168 new GLContextStubWithExtensions()); | 161 new GLContextStubWithExtensions()); |
169 mock_context->SetGLVersionString("3.0"); | 162 mock_context->SetGLVersionString("3.0"); |
170 InitializeDynamicGLBindingsGL(mock_context.get()); | 163 InitializeDynamicGLBindingsGL(mock_context.get()); |
171 } else | 164 } else |
172 InitializeDynamicGLBindingsGL(context); | 165 InitializeDynamicGLBindingsGL(context); |
173 break; | 166 break; |
(...skipping 27 matching lines...) Expand all Loading... |
201 return GetGLWindowSystemBindingInfoGLX(info); | 194 return GetGLWindowSystemBindingInfoGLX(info); |
202 case kGLImplementationEGLGLES2: | 195 case kGLImplementationEGLGLES2: |
203 return GetGLWindowSystemBindingInfoEGL(info); | 196 return GetGLWindowSystemBindingInfoEGL(info); |
204 default: | 197 default: |
205 return false; | 198 return false; |
206 } | 199 } |
207 return false; | 200 return false; |
208 } | 201 } |
209 | 202 |
210 } // namespace gfx | 203 } // namespace gfx |
OLD | NEW |