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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 case kGLImplementationMockGL: | 302 case kGLImplementationMockGL: |
303 InitializeGLExtensionBindingsGL(context); | 303 InitializeGLExtensionBindingsGL(context); |
304 break; | 304 break; |
305 default: | 305 default: |
306 return false; | 306 return false; |
307 } | 307 } |
308 | 308 |
309 return true; | 309 return true; |
310 } | 310 } |
311 | 311 |
312 void InitializeDebugGLBindings() { | |
313 InitializeDebugGLBindingsEGL(); | |
314 InitializeDebugGLBindingsGL(); | |
315 InitializeDebugGLBindingsOSMESA(); | |
316 InitializeDebugGLBindingsWGL(); | |
317 } | |
318 | |
319 void ClearGLBindings() { | 312 void ClearGLBindings() { |
320 ClearGLBindingsEGL(); | 313 ClearGLBindingsEGL(); |
321 ClearGLBindingsGL(); | 314 ClearGLBindingsGL(); |
322 ClearGLBindingsOSMESA(); | 315 ClearGLBindingsOSMESA(); |
323 ClearGLBindingsWGL(); | 316 ClearGLBindingsWGL(); |
324 SetGLImplementation(kGLImplementationNone); | 317 SetGLImplementation(kGLImplementationNone); |
325 UnloadGLNativeLibraries(); | 318 UnloadGLNativeLibraries(); |
326 } | 319 } |
327 | 320 |
328 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { | 321 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { |
329 switch (GetGLImplementation()) { | 322 switch (GetGLImplementation()) { |
330 case kGLImplementationDesktopGL: | 323 case kGLImplementationDesktopGL: |
331 return GetGLWindowSystemBindingInfoWGL(info); | 324 return GetGLWindowSystemBindingInfoWGL(info); |
332 case kGLImplementationEGLGLES2: | 325 case kGLImplementationEGLGLES2: |
333 return GetGLWindowSystemBindingInfoEGL(info); | 326 return GetGLWindowSystemBindingInfoEGL(info); |
334 default: | 327 default: |
335 return false; | 328 return false; |
336 } | 329 } |
337 return false; | 330 return false; |
338 } | 331 } |
339 | 332 |
340 } // namespace gfx | 333 } // namespace gfx |
OLD | NEW |