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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 case kGLImplementationMockGL: | 158 case kGLImplementationMockGL: |
159 InitializeGLExtensionBindingsGL(context); | 159 InitializeGLExtensionBindingsGL(context); |
160 break; | 160 break; |
161 default: | 161 default: |
162 return false; | 162 return false; |
163 } | 163 } |
164 | 164 |
165 return true; | 165 return true; |
166 } | 166 } |
167 | 167 |
168 void InitializeDebugGLBindings() { | |
169 InitializeDebugGLBindingsEGL(); | |
170 InitializeDebugGLBindingsGL(); | |
171 InitializeDebugGLBindingsGLX(); | |
172 InitializeDebugGLBindingsOSMESA(); | |
173 } | |
174 | |
175 void ClearGLBindings() { | 168 void ClearGLBindings() { |
176 ClearGLBindingsEGL(); | 169 ClearGLBindingsEGL(); |
177 ClearGLBindingsGL(); | 170 ClearGLBindingsGL(); |
178 ClearGLBindingsGLX(); | 171 ClearGLBindingsGLX(); |
179 ClearGLBindingsOSMESA(); | 172 ClearGLBindingsOSMESA(); |
180 SetGLImplementation(kGLImplementationNone); | 173 SetGLImplementation(kGLImplementationNone); |
181 | 174 |
182 UnloadGLNativeLibraries(); | 175 UnloadGLNativeLibraries(); |
183 } | 176 } |
184 | 177 |
185 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { | 178 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { |
186 switch (GetGLImplementation()) { | 179 switch (GetGLImplementation()) { |
187 case kGLImplementationDesktopGL: | 180 case kGLImplementationDesktopGL: |
188 return GetGLWindowSystemBindingInfoGLX(info); | 181 return GetGLWindowSystemBindingInfoGLX(info); |
189 case kGLImplementationEGLGLES2: | 182 case kGLImplementationEGLGLES2: |
190 return GetGLWindowSystemBindingInfoEGL(info); | 183 return GetGLWindowSystemBindingInfoEGL(info); |
191 default: | 184 default: |
192 return false; | 185 return false; |
193 } | 186 } |
194 return false; | 187 return false; |
195 } | 188 } |
196 | 189 |
197 } // namespace gfx | 190 } // namespace gfx |
OLD | NEW |