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_osmesa_api_implementation.h" | |
11 #include "ui/gl/gl_wgl_api_implementation.h" | |
12 | |
13 namespace gl { | |
14 | |
15 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { | |
16 impls->push_back(kGLImplementationEGLGLES2); | |
17 impls->push_back(kGLImplementationDesktopGL); | |
18 impls->push_back(kGLImplementationOSMesaGL); | |
19 } | |
20 | |
21 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { | |
22 switch (GetGLImplementation()) { | |
23 case kGLImplementationDesktopGL: | |
24 return GetGLWindowSystemBindingInfoWGL(info); | |
25 case kGLImplementationEGLGLES2: | |
26 return GetGLWindowSystemBindingInfoEGL(info); | |
27 default: | |
28 return false; | |
29 } | |
30 } | |
31 | |
32 } // namespace gl | |
OLD | NEW |