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

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

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/gl_factory.h ('k') | ui/gl/init/gl_init.gyp » ('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 #include "ui/gl/init/gl_factory.h"
6
7 #include "ui/gl/gl_context.h"
8 #include "ui/gl/gl_share_group.h"
9 #include "ui/gl/gl_surface.h"
10
11 namespace gl {
12 namespace init {
13
14 // TODO(kylechar): This file should be replaced with a platform specific
15 // version for X11, Ozone, Windows, Mac and Android. The implementation of each
16 // factory function should be moved into that file and the original static
17 // methods should be removed from GLSurface and GLContext. This file can then
18 // be deleted.
19
20 bool InitializeGLOneOff() {
21 return gfx::GLSurface::InitializeOneOff();
22 }
23
24 scoped_refptr<gfx::GLContext> CreateGLContext(
25 gfx::GLShareGroup* share_group,
26 gfx::GLSurface* compatible_surface,
27 gfx::GpuPreference gpu_preference) {
28 return gfx::GLContext::CreateGLContext(share_group, compatible_surface,
29 gpu_preference);
30 }
31
32 scoped_refptr<gfx::GLSurface> CreateViewGLSurface(
33 gfx::AcceleratedWidget window) {
34 return gfx::GLSurface::CreateViewGLSurface(window);
35 }
36
37 #if defined(USE_OZONE)
38 scoped_refptr<gfx::GLSurface> CreateSurfacelessViewGLSurface(
39 gfx::AcceleratedWidget window) {
40 return gfx::GLSurface::CreateSurfacelessViewGLSurface(window);
41 }
42 #endif // defined(USE_OZONE)
43
44 scoped_refptr<gfx::GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
45 return gfx::GLSurface::CreateOffscreenGLSurface(size);
46 }
47
48 } // namespace init
49 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/init/gl_factory.h ('k') | ui/gl/init/gl_init.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698