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; | |
81 case kGLImplementationEGLGLES2: | 78 case kGLImplementationEGLGLES2: |
82 InitializeDynamicGLBindingsGL(context); | 79 InitializeDynamicGLBindingsGL(context); |
83 InitializeDynamicGLBindingsEGL(context); | |
84 break; | 80 break; |
85 case kGLImplementationMockGL: | 81 case kGLImplementationMockGL: |
86 if (!context) { | 82 if (!context) { |
87 scoped_refptr<GLContextStubWithExtensions> mock_context( | 83 scoped_refptr<GLContextStubWithExtensions> mock_context( |
88 new GLContextStubWithExtensions()); | 84 new GLContextStubWithExtensions()); |
89 mock_context->SetGLVersionString("3.0"); | 85 mock_context->SetGLVersionString("3.0"); |
90 InitializeDynamicGLBindingsGL(mock_context.get()); | 86 InitializeDynamicGLBindingsGL(mock_context.get()); |
91 } else | 87 } else |
92 InitializeDynamicGLBindingsGL(context); | 88 InitializeDynamicGLBindingsGL(context); |
93 break; | 89 break; |
(...skipping 18 matching lines...) Expand all Loading... |
112 switch (GetGLImplementation()) { | 108 switch (GetGLImplementation()) { |
113 case kGLImplementationEGLGLES2: | 109 case kGLImplementationEGLGLES2: |
114 return GetGLWindowSystemBindingInfoEGL(info); | 110 return GetGLWindowSystemBindingInfoEGL(info); |
115 default: | 111 default: |
116 return false; | 112 return false; |
117 } | 113 } |
118 return false; | 114 return false; |
119 } | 115 } |
120 | 116 |
121 } // namespace gfx | 117 } // namespace gfx |
OLD | NEW |