| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_INIT_GL_FACTORY_H_ | 5 #ifndef UI_GL_INIT_GL_FACTORY_H_ |
| 6 #define UI_GL_INIT_GL_FACTORY_H_ | 6 #define UI_GL_INIT_GL_FACTORY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // Returns a list of allowed GL implementations. The default implementation will | 27 // Returns a list of allowed GL implementations. The default implementation will |
| 28 // be the first item. | 28 // be the first item. |
| 29 GL_INIT_EXPORT std::vector<GLImplementation> GetAllowedGLImplementations(); | 29 GL_INIT_EXPORT std::vector<GLImplementation> GetAllowedGLImplementations(); |
| 30 | 30 |
| 31 // Initializes GL bindings. | 31 // Initializes GL bindings. |
| 32 GL_INIT_EXPORT bool InitializeGLOneOff(); | 32 GL_INIT_EXPORT bool InitializeGLOneOff(); |
| 33 | 33 |
| 34 // Initializes GL bindings using the provided parameters. This might be required | 34 // Initializes GL bindings using the provided parameters. This might be required |
| 35 // for use in tests, otherwise use InitializeGLOneOff() instead. | 35 // for use in tests, otherwise use InitializeGLOneOff() instead. |
| 36 GL_INIT_EXPORT bool InitializeGLOneOffImplementation(GLImplementation impl, | 36 GL_INIT_EXPORT bool InitializeGLOneOffImplementation( |
| 37 bool fallback_to_osmesa, | 37 GLImplementation impl, |
| 38 bool gpu_service_logging, | 38 bool fallback_to_software_gl, |
| 39 bool disable_gl_drawing); | 39 bool gpu_service_logging, |
| 40 bool disable_gl_drawing); |
| 40 | 41 |
| 41 // Clears GL bindings and resets GL implementation. | 42 // Clears GL bindings and resets GL implementation. |
| 42 GL_INIT_EXPORT void ShutdownGL(); | 43 GL_INIT_EXPORT void ShutdownGL(); |
| 43 | 44 |
| 44 // Return information about the GL window system binding implementation (e.g., | 45 // Return information about the GL window system binding implementation (e.g., |
| 45 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. | 46 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. |
| 46 GL_INIT_EXPORT bool GetGLWindowSystemBindingInfo( | 47 GL_INIT_EXPORT bool GetGLWindowSystemBindingInfo( |
| 47 GLWindowSystemBindingInfo* info); | 48 GLWindowSystemBindingInfo* info); |
| 48 | 49 |
| 49 // Creates a GL context that is compatible with the given surface. | 50 // Creates a GL context that is compatible with the given surface. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 71 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 72 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
| 72 const gfx::Size& size); | 73 const gfx::Size& size); |
| 73 | 74 |
| 74 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( | 75 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( |
| 75 const gfx::Size& size, GLSurfaceFormat format); | 76 const gfx::Size& size, GLSurfaceFormat format); |
| 76 | 77 |
| 77 } // namespace init | 78 } // namespace init |
| 78 } // namespace gl | 79 } // namespace gl |
| 79 | 80 |
| 80 #endif // UI_GL_INIT_GL_FACTORY_H_ | 81 #endif // UI_GL_INIT_GL_FACTORY_H_ |
| OLD | NEW |