OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ui/gl/init/gl_initializer.h" | 5 #include "ui/gl/init/gl_initializer.h" |
6 | 6 |
7 #include <OpenGL/CGLRenderers.h> | 7 #include <OpenGL/CGLRenderers.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 base::ThreadRestrictions::ScopedAllowIO allow_io; | 156 base::ThreadRestrictions::ScopedAllowIO allow_io; |
157 | 157 |
158 switch (implementation) { | 158 switch (implementation) { |
159 case kGLImplementationOSMesaGL: | 159 case kGLImplementationOSMesaGL: |
160 return InitializeStaticOSMesaInternal(); | 160 return InitializeStaticOSMesaInternal(); |
161 case kGLImplementationDesktopGL: | 161 case kGLImplementationDesktopGL: |
162 case kGLImplementationDesktopGLCoreProfile: | 162 case kGLImplementationDesktopGLCoreProfile: |
163 case kGLImplementationAppleGL: | 163 case kGLImplementationAppleGL: |
164 return InitializeStaticCGLInternal(implementation); | 164 return InitializeStaticCGLInternal(implementation); |
165 case kGLImplementationMockGL: | 165 case kGLImplementationMockGL: |
166 SetGLImplementation(kGLImplementationMockGL); | 166 case kGLImplementationStubGL: |
| 167 SetGLImplementation(implementation); |
167 InitializeStaticGLBindingsGL(); | 168 InitializeStaticGLBindingsGL(); |
168 return true; | 169 return true; |
169 default: | 170 default: |
170 NOTREACHED(); | 171 NOTREACHED(); |
171 } | 172 } |
172 | 173 |
173 return false; | 174 return false; |
174 } | 175 } |
175 | 176 |
176 void InitializeDebugGLBindings() { | 177 void InitializeDebugGLBindings() { |
177 InitializeDebugGLBindingsGL(); | 178 InitializeDebugGLBindingsGL(); |
178 InitializeDebugGLBindingsOSMESA(); | 179 InitializeDebugGLBindingsOSMESA(); |
179 } | 180 } |
180 | 181 |
181 void ShutdownGLPlatform() { | 182 void ShutdownGLPlatform() { |
182 ClearBindingsGL(); | 183 ClearBindingsGL(); |
183 ClearBindingsOSMESA(); | 184 ClearBindingsOSMESA(); |
184 } | 185 } |
185 | 186 |
186 } // namespace init | 187 } // namespace init |
187 } // namespace gl | 188 } // namespace gl |
OLD | NEW |