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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Clears GL bindings and resets GL implementation. | 39 // Clears GL bindings and resets GL implementation. |
40 GL_INIT_EXPORT void ClearGLBindings(); | 40 GL_INIT_EXPORT void ClearGLBindings(); |
41 | 41 |
42 // Return information about the GL window system binding implementation (e.g., | 42 // Return information about the GL window system binding implementation (e.g., |
43 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. | 43 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. |
44 GL_INIT_EXPORT bool GetGLWindowSystemBindingInfo( | 44 GL_INIT_EXPORT bool GetGLWindowSystemBindingInfo( |
45 GLWindowSystemBindingInfo* info); | 45 GLWindowSystemBindingInfo* info); |
46 | 46 |
47 // Creates a GL context that is compatible with the given surface. | 47 // Creates a GL context that is compatible with the given surface. |
48 // |share_group|, if non-NULL, is a group of contexts which the internally | 48 // |share_group|, if non-null, is a group of contexts which the internally |
49 // created OpenGL context shares textures and other resources. | 49 // created OpenGL context shares textures and other resources. |
50 GL_INIT_EXPORT scoped_refptr<GLContext> CreateGLContext( | 50 GL_INIT_EXPORT scoped_refptr<GLContext> CreateGLContext( |
51 GLShareGroup* share_group, | 51 GLShareGroup* share_group, |
52 GLSurface* compatible_surface, | 52 GLSurface* compatible_surface, |
53 GpuPreference gpu_preference); | 53 GpuPreference gpu_preference); |
54 | 54 |
55 // Creates a GL surface that renders directly to a view. | 55 // Creates a GL surface that renders directly to a view. |
56 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateViewGLSurface( | 56 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateViewGLSurface( |
57 gfx::AcceleratedWidget window); | 57 gfx::AcceleratedWidget window); |
58 | 58 |
59 #if defined(USE_OZONE) | 59 #if defined(USE_OZONE) |
60 // Creates a GL surface that renders directly into a window with surfaceless | 60 // Creates a GL surface that renders directly into a window with surfaceless |
61 // semantics - there is no default framebuffer and the primary surface must | 61 // semantics - there is no default framebuffer and the primary surface must |
62 // be presented as an overlay. If surfaceless mode is not supported or | 62 // be presented as an overlay. If surfaceless mode is not supported or |
63 // enabled it will return a null pointer. | 63 // enabled it will return a null pointer. |
64 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface( | 64 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface( |
65 gfx::AcceleratedWidget window); | 65 gfx::AcceleratedWidget window); |
66 #endif // defined(USE_OZONE) | 66 #endif // defined(USE_OZONE) |
67 | 67 |
68 // Creates a GL surface used for offscreen rendering. | 68 // Creates a GL surface used for offscreen rendering. |
69 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 69 GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
70 const gfx::Size& size); | 70 const gfx::Size& size); |
71 | 71 |
72 } // namespace init | 72 } // namespace init |
73 } // namespace gl | 73 } // namespace gl |
74 | 74 |
75 #endif // UI_GL_INIT_GL_FACTORY_H_ | 75 #endif // UI_GL_INIT_GL_FACTORY_H_ |
OLD | NEW |