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

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

Issue 2902863002: Implement EGL context priority if supported, use in VrShell (Closed)
Patch Set: Created 3 years, 7 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 | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('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 21 matching lines...) Expand all
32 class DebugGLApi; 32 class DebugGLApi;
33 struct DriverGL; 33 struct DriverGL;
34 class GLApi; 34 class GLApi;
35 class GLSurface; 35 class GLSurface;
36 class GPUTiming; 36 class GPUTiming;
37 class GPUTimingClient; 37 class GPUTimingClient;
38 struct GLVersionInfo; 38 struct GLVersionInfo;
39 class RealGLApi; 39 class RealGLApi;
40 class TraceGLApi; 40 class TraceGLApi;
41 41
42 enum ContextPriority {
43 ContextPriorityLow,
44 ContextPriorityMedium,
45 ContextPriorityHigh
46 };
47
42 struct GLContextAttribs { 48 struct GLContextAttribs {
43 GpuPreference gpu_preference = PreferIntegratedGpu; 49 GpuPreference gpu_preference = PreferIntegratedGpu;
44 bool bind_generates_resource = true; 50 bool bind_generates_resource = true;
45 bool webgl_compatibility_context = false; 51 bool webgl_compatibility_context = false;
46 bool global_texture_share_group = false; 52 bool global_texture_share_group = false;
47 int client_major_es_version = 3; 53 int client_major_es_version = 3;
48 int client_minor_es_version = 0; 54 int client_minor_es_version = 0;
55 ContextPriority context_priority = ContextPriorityMedium;
49 }; 56 };
50 57
51 // Encapsulates an OpenGL context, hiding platform specific management. 58 // Encapsulates an OpenGL context, hiding platform specific management.
52 class GL_EXPORT GLContext : public base::RefCounted<GLContext> { 59 class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
53 public: 60 public:
54 explicit GLContext(GLShareGroup* share_group); 61 explicit GLContext(GLShareGroup* share_group);
55 62
56 // Initializes the GL context to be compatible with the given surface. The GL 63 // Initializes the GL context to be compatible with the given surface. The GL
57 // context can be made with other surface's of the same type. The compatible 64 // context can be made with other surface's of the same type. The compatible
58 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It 65 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // scoped_refptr containing the initialized GLContext or nullptr if 247 // scoped_refptr containing the initialized GLContext or nullptr if
241 // initialization fails. 248 // initialization fails.
242 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( 249 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext(
243 scoped_refptr<GLContext> context, 250 scoped_refptr<GLContext> context,
244 GLSurface* compatible_surface, 251 GLSurface* compatible_surface,
245 const GLContextAttribs& attribs); 252 const GLContextAttribs& attribs);
246 253
247 } // namespace gl 254 } // namespace gl
248 255
249 #endif // UI_GL_GL_CONTEXT_H_ 256 #endif // UI_GL_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698