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

Side by Side Diff: ui/gl/init/gl_factory.h

Issue 1920163005: Split //ui/gl into //ui/gl + //ui/gi/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_GL_INIT_GL_FACTORY_H_
6 #define UI_GL_INIT_GL_FACTORY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/gl/gpu_preference.h"
12 #include "ui/gl/init/gl_init_export.h"
13
14 namespace gfx {
15 class GLContext;
16 class GLShareGroup;
17 class GLSurface;
18 };
19
20 namespace gl {
21 namespace init {
22
23 // Initialize GL bindings.
24 GL_INIT_EXPORT bool InitializeGLOneOff();
25
26 // Create a GL context that is compatible with the given surface. |share_group|,
27 // if non-NULL, is a group of contexts which the internally created OpenGL
28 // context shares textures and other resources.
29 GL_INIT_EXPORT scoped_refptr<gfx::GLContext> CreateGLContext(
30 gfx::GLShareGroup* share_group,
31 gfx::GLSurface* compatible_surface,
32 gfx::GpuPreference gpu_preference);
33
34 // Create a GL surface that renders directly to a view.
35 GL_INIT_EXPORT scoped_refptr<gfx::GLSurface> CreateViewGLSurface(
36 gfx::AcceleratedWidget window);
37
38 #if defined(USE_OZONE)
39 // Create a GL surface that renders directly into a window with surfaceless
40 // semantics - there is no default framebuffer and the primary surface must
41 // be presented as an overlay. If surfaceless mode is not supported or
42 // enabled it will return a null pointer.
43 GL_INIT_EXPORT scoped_refptr<gfx::GLSurface> CreateSurfacelessViewGLSurface(
44 gfx::AcceleratedWidget window);
45 #endif // defined(USE_OZONE)
46
47 // Create a GL surface used for offscreen rendering.
48 GL_INIT_EXPORT scoped_refptr<gfx::GLSurface> CreateOffscreenGLSurface(
49 const gfx::Size& size);
50
51 } // namespace init
52 } // namespace gl
53
54 #endif // UI_GL_INIT_GL_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698