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 #ifndef UI_GL_GL_IMPLEMENTATION_H_ | 5 #ifndef UI_GL_GL_IMPLEMENTATION_H_ |
6 #define UI_GL_GL_IMPLEMENTATION_H_ | 6 #define UI_GL_GL_IMPLEMENTATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 GL_EXPORT GLImplementation GetGLImplementation(); | 90 GL_EXPORT GLImplementation GetGLImplementation(); |
91 | 91 |
92 // Does the underlying GL support all features from Desktop GL 2.0 that were | 92 // Does the underlying GL support all features from Desktop GL 2.0 that were |
93 // removed from the ES 2.0 spec without requiring specific extension strings. | 93 // removed from the ES 2.0 spec without requiring specific extension strings. |
94 GL_EXPORT bool HasDesktopGLFeatures(); | 94 GL_EXPORT bool HasDesktopGLFeatures(); |
95 | 95 |
96 // Get the GL implementation with a given name. | 96 // Get the GL implementation with a given name. |
97 GLImplementation GetNamedGLImplementation(const std::string& name); | 97 GLImplementation GetNamedGLImplementation(const std::string& name); |
98 | 98 |
99 // Get the name of a GL implementation. | 99 // Get the name of a GL implementation. |
100 const char* GetGLImplementationName(GLImplementation implementation); | 100 GL_EXPORT const char* GetGLImplementationName(GLImplementation implementation); |
| 101 |
| 102 // Determine GL implementation to use depending on the combination of parameters |
| 103 // present in the command line. |
| 104 GL_EXPORT bool SelectGLImplementation(GLImplementation* impl, |
| 105 bool* fallback_to_osmesa); |
| 106 |
| 107 // Return the shared library names for the given GLImplementation. |
| 108 GL_EXPORT bool GetNativeLibraryNamesFromGLImplementation( |
| 109 GLImplementation implementation, |
| 110 std::vector<std::string>* required_librarie); |
101 | 111 |
102 // Add a native library to those searched for GL entry points. | 112 // Add a native library to those searched for GL entry points. |
103 void AddGLNativeLibrary(base::NativeLibrary library); | 113 void AddGLNativeLibrary(base::NativeLibrary library); |
104 | 114 |
105 // Unloads all native libraries. | 115 // Unloads all native libraries. |
106 void UnloadGLNativeLibraries(); | 116 void UnloadGLNativeLibraries(); |
107 | 117 |
108 // Set an additional function that will be called to find GL entry points. | 118 // Set an additional function that will be called to find GL entry points. |
109 // Exported so that tests may set the function used in the mock implementation. | 119 // Exported so that tests may set the function used in the mock implementation. |
110 GL_EXPORT void SetGLGetProcAddressProc(GLGetProcAddressProc proc); | 120 GL_EXPORT void SetGLGetProcAddressProc(GLGetProcAddressProc proc); |
(...skipping 20 matching lines...) Expand all Loading... |
131 GL_EXPORT std::string GetGLExtensionsFromCurrentContext(); | 141 GL_EXPORT std::string GetGLExtensionsFromCurrentContext(); |
132 | 142 |
133 // Helper for the GL bindings implementation to understand whether | 143 // Helper for the GL bindings implementation to understand whether |
134 // glGetString(GL_EXTENSIONS) or glGetStringi(GL_EXTENSIONS, i) will | 144 // glGetString(GL_EXTENSIONS) or glGetStringi(GL_EXTENSIONS, i) will |
135 // be used in the function above. | 145 // be used in the function above. |
136 GL_EXPORT bool WillUseGLGetStringForExtensions(); | 146 GL_EXPORT bool WillUseGLGetStringForExtensions(); |
137 | 147 |
138 } // namespace gfx | 148 } // namespace gfx |
139 | 149 |
140 #endif // UI_GL_GL_IMPLEMENTATION_H_ | 150 #endif // UI_GL_GL_IMPLEMENTATION_H_ |
OLD | NEW |