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/base_paths.h" | 5 #include "base/base_paths.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/native_library.h" | 9 #include "base/native_library.h" |
10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 return true; | 94 return true; |
95 } | 95 } |
96 | 96 |
97 bool InitializeDynamicGLBindings(GLImplementation implementation, | 97 bool InitializeDynamicGLBindings(GLImplementation implementation, |
98 GLContext* context) { | 98 GLContext* context) { |
99 switch (implementation) { | 99 switch (implementation) { |
100 case kGLImplementationEGLGLES2: | 100 case kGLImplementationEGLGLES2: |
101 InitializeDynamicGLBindingsGL(context); | 101 InitializeDynamicGLBindingsGL(context); |
102 InitializeDynamicGLBindingsEGL(context); | |
103 break; | |
104 case kGLImplementationOSMesaGL: | |
105 InitializeDynamicGLBindingsGL(context); | |
106 InitializeDynamicGLBindingsOSMESA(context); | |
107 break; | 102 break; |
108 case kGLImplementationMockGL: | 103 case kGLImplementationMockGL: |
109 if (!context) { | 104 if (!context) { |
110 scoped_refptr<GLContextStubWithExtensions> mock_context( | 105 scoped_refptr<GLContextStubWithExtensions> mock_context( |
111 new GLContextStubWithExtensions()); | 106 new GLContextStubWithExtensions()); |
112 mock_context->SetGLVersionString("opengl es 3.0"); | 107 mock_context->SetGLVersionString("opengl es 3.0"); |
113 InitializeDynamicGLBindingsGL(mock_context.get()); | 108 InitializeDynamicGLBindingsGL(mock_context.get()); |
114 } else | 109 } else |
115 InitializeDynamicGLBindingsGL(context); | 110 InitializeDynamicGLBindingsGL(context); |
116 break; | 111 break; |
(...skipping 24 matching lines...) Expand all Loading... |
141 switch (GetGLImplementation()) { | 136 switch (GetGLImplementation()) { |
142 case kGLImplementationEGLGLES2: | 137 case kGLImplementationEGLGLES2: |
143 return GetGLWindowSystemBindingInfoEGL(info); | 138 return GetGLWindowSystemBindingInfoEGL(info); |
144 default: | 139 default: |
145 return false; | 140 return false; |
146 } | 141 } |
147 return false; | 142 return false; |
148 } | 143 } |
149 | 144 |
150 } // namespace gfx | 145 } // namespace gfx |
OLD | NEW |