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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return false; | 91 return false; |
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 InitializeDynamicGLBindingsEGL(context); |
101 InitializeDynamicGLBindingsGL(context); | 102 InitializeDynamicGLBindingsGL(context); |
102 break; | 103 break; |
103 case kGLImplementationMockGL: | 104 case kGLImplementationMockGL: |
104 if (!context) { | 105 if (!context) { |
105 scoped_refptr<GLContextStubWithExtensions> mock_context( | 106 scoped_refptr<GLContextStubWithExtensions> mock_context( |
106 new GLContextStubWithExtensions()); | 107 new GLContextStubWithExtensions()); |
107 mock_context->SetGLVersionString("opengl es 3.0"); | 108 mock_context->SetGLVersionString("opengl es 3.0"); |
108 InitializeDynamicGLBindingsGL(mock_context.get()); | 109 InitializeDynamicGLBindingsGL(mock_context.get()); |
109 } else | 110 } else |
110 InitializeDynamicGLBindingsGL(context); | 111 InitializeDynamicGLBindingsGL(context); |
(...skipping 25 matching lines...) Expand all Loading... |
136 switch (GetGLImplementation()) { | 137 switch (GetGLImplementation()) { |
137 case kGLImplementationEGLGLES2: | 138 case kGLImplementationEGLGLES2: |
138 return GetGLWindowSystemBindingInfoEGL(info); | 139 return GetGLWindowSystemBindingInfoEGL(info); |
139 default: | 140 default: |
140 return false; | 141 return false; |
141 } | 142 } |
142 return false; | 143 return false; |
143 } | 144 } |
144 | 145 |
145 } // namespace gfx | 146 } // namespace gfx |
OLD | NEW |