Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: ui/gl/gl_context.h

Issue 2586803003: Enable creation of offscreen contexts which own their backing surface. (Closed)
Patch Set: Rebase, update comment for alpha semantics Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/platform/Platform.h ('k') | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
40 }; 41 };
41 42
42 // Encapsulates an OpenGL context, hiding platform specific management. 43 // Encapsulates an OpenGL context, hiding platform specific management.
43 class GL_EXPORT GLContext : public base::RefCounted<GLContext> { 44 class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
44 public: 45 public:
45 explicit GLContext(GLShareGroup* share_group); 46 explicit GLContext(GLShareGroup* share_group);
46 47
47 // Initializes the GL context to be compatible with the given surface. The GL 48 // Initializes the GL context to be compatible with the given surface. The GL
48 // context can be made with other surface's of the same type. The compatible 49 // context can be made with other surface's of the same type. The compatible
49 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It 50 // 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
203 // scoped_refptr containing the initialized GLContext or nullptr if 204 // scoped_refptr containing the initialized GLContext or nullptr if
204 // initialization fails. 205 // initialization fails.
205 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( 206 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext(
206 scoped_refptr<GLContext> context, 207 scoped_refptr<GLContext> context,
207 GLSurface* compatible_surface, 208 GLSurface* compatible_surface,
208 const GLContextAttribs& attribs); 209 const GLContextAttribs& attribs);
209 210
210 } // namespace gl 211 } // namespace gl
211 212
212 #endif // UI_GL_GL_CONTEXT_H_ 213 #endif // UI_GL_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/Platform.h ('k') | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698