OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/gl/gl_implementation.h" | |
6 | |
7 #include "ui/gl/gl_context_stub_with_extensions.h" | |
8 #include "ui/gl/gl_egl_api_implementation.h" | |
9 #include "ui/gl/gl_gl_api_implementation.h" | |
10 #include "ui/gl/gl_glx_api_implementation.h" | |
11 #include "ui/gl/gl_implementation_osmesa.h" | |
12 #include "ui/gl/gl_osmesa_api_implementation.h" | |
13 | |
14 namespace gl { | |
15 | |
16 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { | |
17 impls->push_back(kGLImplementationDesktopGL); | |
18 impls->push_back(kGLImplementationEGLGLES2); | |
19 impls->push_back(kGLImplementationOSMesaGL); | |
20 } | |
21 | |
22 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { | |
23 switch (GetGLImplementation()) { | |
24 case kGLImplementationDesktopGL: | |
25 return GetGLWindowSystemBindingInfoGLX(info); | |
26 case kGLImplementationEGLGLES2: | |
27 return GetGLWindowSystemBindingInfoEGL(info); | |
28 default: | |
29 return false; | |
30 } | |
31 return false; | |
32 } | |
33 | |
34 } // namespace gl | |
OLD | NEW |