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/bind.h" | 5 #include "base/bind.h" |
6 #include "ui/gl/gl_bindings.h" | 6 #include "ui/gl/gl_bindings.h" |
7 #include "ui/gl/gl_context_stub_with_extensions.h" | 7 #include "ui/gl/gl_context_stub_with_extensions.h" |
8 #include "ui/gl/gl_egl_api_implementation.h" | 8 #include "ui/gl/gl_egl_api_implementation.h" |
9 #include "ui/gl/gl_gl_api_implementation.h" | 9 #include "ui/gl/gl_gl_api_implementation.h" |
10 #include "ui/gl/gl_implementation.h" | 10 #include "ui/gl/gl_implementation.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 return false; | 68 return false; |
69 } | 69 } |
70 | 70 |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 bool InitializeDynamicGLBindings(GLImplementation implementation, | 74 bool InitializeDynamicGLBindings(GLImplementation implementation, |
75 GLContext* context) { | 75 GLContext* context) { |
76 switch (implementation) { | 76 switch (implementation) { |
77 case kGLImplementationOSMesaGL: | 77 case kGLImplementationOSMesaGL: |
| 78 InitializeDynamicGLBindingsGL(context); |
| 79 InitializeDynamicGLBindingsOSMESA(context); |
| 80 break; |
78 case kGLImplementationEGLGLES2: | 81 case kGLImplementationEGLGLES2: |
79 InitializeDynamicGLBindingsGL(context); | 82 InitializeDynamicGLBindingsGL(context); |
| 83 InitializeDynamicGLBindingsEGL(context); |
80 break; | 84 break; |
81 case kGLImplementationMockGL: | 85 case kGLImplementationMockGL: |
82 if (!context) { | 86 if (!context) { |
83 scoped_refptr<GLContextStubWithExtensions> mock_context( | 87 scoped_refptr<GLContextStubWithExtensions> mock_context( |
84 new GLContextStubWithExtensions()); | 88 new GLContextStubWithExtensions()); |
85 mock_context->SetGLVersionString("3.0"); | 89 mock_context->SetGLVersionString("3.0"); |
86 InitializeDynamicGLBindingsGL(mock_context.get()); | 90 InitializeDynamicGLBindingsGL(mock_context.get()); |
87 } else | 91 } else |
88 InitializeDynamicGLBindingsGL(context); | 92 InitializeDynamicGLBindingsGL(context); |
89 break; | 93 break; |
(...skipping 18 matching lines...) Expand all Loading... |
108 switch (GetGLImplementation()) { | 112 switch (GetGLImplementation()) { |
109 case kGLImplementationEGLGLES2: | 113 case kGLImplementationEGLGLES2: |
110 return GetGLWindowSystemBindingInfoEGL(info); | 114 return GetGLWindowSystemBindingInfoEGL(info); |
111 default: | 115 default: |
112 return false; | 116 return false; |
113 } | 117 } |
114 return false; | 118 return false; |
115 } | 119 } |
116 | 120 |
117 } // namespace gfx | 121 } // namespace gfx |
OLD | NEW |