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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 GL_EXPORT GLImplementation GetGLImplementation(); | 91 GL_EXPORT GLImplementation GetGLImplementation(); |
92 | 92 |
93 // Does the underlying GL support all features from Desktop GL 2.0 that were | 93 // Does the underlying GL support all features from Desktop GL 2.0 that were |
94 // removed from the ES 2.0 spec without requiring specific extension strings. | 94 // removed from the ES 2.0 spec without requiring specific extension strings. |
95 GL_EXPORT bool HasDesktopGLFeatures(); | 95 GL_EXPORT bool HasDesktopGLFeatures(); |
96 | 96 |
97 // Get the GL implementation with a given name. | 97 // Get the GL implementation with a given name. |
98 GLImplementation GetNamedGLImplementation(const std::string& name); | 98 GLImplementation GetNamedGLImplementation(const std::string& name); |
99 | 99 |
100 // Get the name of a GL implementation. | 100 // Get the name of a GL implementation. |
101 const char* GetGLImplementationName(GLImplementation implementation); | 101 GL_EXPORT const char* GetGLImplementationName(GLImplementation implementation); |
| 102 |
| 103 // Determine GL implementation to use depending on the combination of parameters |
| 104 // present in the command line. |
| 105 GL_EXPORT bool SelectGLImplementation(GLImplementation* impl, |
| 106 bool* fallback_to_osmesa); |
| 107 |
| 108 // Return the shared library names for the given GLImplementation. |
| 109 GL_EXPORT bool GetNativeLibraryNamesFromGLImplementation( |
| 110 GLImplementation implementation, |
| 111 std::vector<std::string>* required_librarie); |
102 | 112 |
103 // Add a native library to those searched for GL entry points. | 113 // Add a native library to those searched for GL entry points. |
104 void AddGLNativeLibrary(base::NativeLibrary library); | 114 void AddGLNativeLibrary(base::NativeLibrary library); |
105 | 115 |
106 // Unloads all native libraries. | 116 // Unloads all native libraries. |
107 void UnloadGLNativeLibraries(); | 117 void UnloadGLNativeLibraries(); |
108 | 118 |
109 // Set an additional function that will be called to find GL entry points. | 119 // Set an additional function that will be called to find GL entry points. |
110 // Exported so that tests may set the function used in the mock implementation. | 120 // Exported so that tests may set the function used in the mock implementation. |
111 GL_EXPORT void SetGLGetProcAddressProc(GLGetProcAddressProc proc); | 121 GL_EXPORT void SetGLGetProcAddressProc(GLGetProcAddressProc proc); |
(...skipping 25 matching lines...) Expand all Loading... |
137 GL_EXPORT bool WillUseGLGetStringForExtensions(); | 147 GL_EXPORT bool WillUseGLGetStringForExtensions(); |
138 | 148 |
139 // Helpers to load a library and log error on failure. | 149 // Helpers to load a library and log error on failure. |
140 base::NativeLibrary LoadLibraryAndPrintError( | 150 base::NativeLibrary LoadLibraryAndPrintError( |
141 const base::FilePath::CharType* filename); | 151 const base::FilePath::CharType* filename); |
142 base::NativeLibrary LoadLibraryAndPrintError(const base::FilePath& filename); | 152 base::NativeLibrary LoadLibraryAndPrintError(const base::FilePath& filename); |
143 | 153 |
144 } // namespace gfx | 154 } // namespace gfx |
145 | 155 |
146 #endif // UI_GL_GL_IMPLEMENTATION_H_ | 156 #endif // UI_GL_GL_IMPLEMENTATION_H_ |
OLD | NEW |