| 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_CONTEXT_H_ | 5 #ifndef UI_GL_GL_CONTEXT_H_ |
| 6 #define UI_GL_GL_CONTEXT_H_ | 6 #define UI_GL_GL_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 class GLSurface; | 31 class GLSurface; |
| 32 class GPUTiming; | 32 class GPUTiming; |
| 33 class GPUTimingClient; | 33 class GPUTimingClient; |
| 34 struct GLVersionInfo; | 34 struct GLVersionInfo; |
| 35 | 35 |
| 36 struct GLContextAttribs { | 36 struct GLContextAttribs { |
| 37 GpuPreference gpu_preference = PreferIntegratedGpu; | 37 GpuPreference gpu_preference = PreferIntegratedGpu; |
| 38 bool bind_generates_resource = true; | 38 bool bind_generates_resource = true; |
| 39 bool webgl_compatibility_context = false; | 39 bool webgl_compatibility_context = false; |
| 40 bool low_priority = false; | |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 // Encapsulates an OpenGL context, hiding platform specific management. | 42 // Encapsulates an OpenGL context, hiding platform specific management. |
| 44 class GL_EXPORT GLContext : public base::RefCounted<GLContext> { | 43 class GL_EXPORT GLContext : public base::RefCounted<GLContext> { |
| 45 public: | 44 public: |
| 46 explicit GLContext(GLShareGroup* share_group); | 45 explicit GLContext(GLShareGroup* share_group); |
| 47 | 46 |
| 48 // Initializes the GL context to be compatible with the given surface. The GL | 47 // Initializes the GL context to be compatible with the given surface. The GL |
| 49 // context can be made with other surface's of the same type. The compatible | 48 // context can be made with other surface's of the same type. The compatible |
| 50 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It | 49 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // scoped_refptr containing the initialized GLContext or nullptr if | 203 // scoped_refptr containing the initialized GLContext or nullptr if |
| 205 // initialization fails. | 204 // initialization fails. |
| 206 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( | 205 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( |
| 207 scoped_refptr<GLContext> context, | 206 scoped_refptr<GLContext> context, |
| 208 GLSurface* compatible_surface, | 207 GLSurface* compatible_surface, |
| 209 const GLContextAttribs& attribs); | 208 const GLContextAttribs& attribs); |
| 210 | 209 |
| 211 } // namespace gl | 210 } // namespace gl |
| 212 | 211 |
| 213 #endif // UI_GL_GL_CONTEXT_H_ | 212 #endif // UI_GL_GL_CONTEXT_H_ |
| OLD | NEW |