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

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

Issue 2693333003: Don't use a global share group for the passthrough command buffer contexts. (Closed)
Patch Set: Created 3 years, 10 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
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 25 matching lines...) Expand all
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 struct GLContextAttribs { 42 struct GLContextAttribs {
43 GpuPreference gpu_preference = PreferIntegratedGpu; 43 GpuPreference gpu_preference = PreferIntegratedGpu;
44 bool bind_generates_resource = true; 44 bool bind_generates_resource = true;
45 bool webgl_compatibility_context = false; 45 bool webgl_compatibility_context = false;
46 bool global_texture_share_group = false;
47 int client_major_es_version = 3;
48 int client_minor_es_version = 0;
46 }; 49 };
47 50
48 // Encapsulates an OpenGL context, hiding platform specific management. 51 // Encapsulates an OpenGL context, hiding platform specific management.
49 class GL_EXPORT GLContext : public base::RefCounted<GLContext> { 52 class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
50 public: 53 public:
51 explicit GLContext(GLShareGroup* share_group); 54 explicit GLContext(GLShareGroup* share_group);
52 55
53 // Initializes the GL context to be compatible with the given surface. The GL 56 // Initializes the GL context to be compatible with the given surface. The GL
54 // context can be made with other surface's of the same type. The compatible 57 // context can be made with other surface's of the same type. The compatible
55 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It 58 // surface is only needed for certain platforms like WGL, OSMesa and GLX. It
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // scoped_refptr containing the initialized GLContext or nullptr if 233 // scoped_refptr containing the initialized GLContext or nullptr if
231 // initialization fails. 234 // initialization fails.
232 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( 235 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext(
233 scoped_refptr<GLContext> context, 236 scoped_refptr<GLContext> context,
234 GLSurface* compatible_surface, 237 GLSurface* compatible_surface,
235 const GLContextAttribs& attribs); 238 const GLContextAttribs& attribs);
236 239
237 } // namespace gl 240 } // namespace gl
238 241
239 #endif // UI_GL_GL_CONTEXT_H_ 242 #endif // UI_GL_GL_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698