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

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

Issue 2037793002: Move GLContext creation from //ui/gl to //ui/gl/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gl_init
Patch Set: Change to scoped_refptr. Created 4 years, 6 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_android.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 2016 The Chromium Authors. All rights reserved. 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 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 #include "ui/gl/init/gl_factory.h" 5 #include "ui/gl/init/gl_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 InitializeNullDrawGLBindings(); 82 InitializeNullDrawGLBindings();
83 } 83 }
84 return initialized; 84 return initialized;
85 } 85 }
86 86
87 // TODO(kylechar): The functions below should be replaced with a platform 87 // TODO(kylechar): The functions below should be replaced with a platform
88 // specific version for X11, Ozone, Windows, Mac and Android. The implementation 88 // specific version for X11, Ozone, Windows, Mac and Android. The implementation
89 // of each function should be moved into a platform specific file and the 89 // of each function should be moved into a platform specific file and the
90 // original static functions should be removed from GLSurface and GLContext. 90 // original static functions should be removed from GLSurface and GLContext.
91 91
92 scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
93 GLSurface* compatible_surface,
94 GpuPreference gpu_preference) {
95 return GLContext::CreateGLContext(share_group, compatible_surface,
96 gpu_preference);
97 }
98
99 scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) { 92 scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
100 return GLSurface::CreateViewGLSurface(window); 93 return GLSurface::CreateViewGLSurface(window);
101 } 94 }
102 95
103 #if defined(USE_OZONE) 96 #if defined(USE_OZONE)
104 scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface( 97 scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface(
105 gfx::AcceleratedWidget window) { 98 gfx::AcceleratedWidget window) {
106 return GLSurface::CreateSurfacelessViewGLSurface(window); 99 return GLSurface::CreateSurfacelessViewGLSurface(window);
107 } 100 }
108 #endif // defined(USE_OZONE) 101 #endif // defined(USE_OZONE)
109 102
110 scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) { 103 scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
111 return GLSurface::CreateOffscreenGLSurface(size); 104 return GLSurface::CreateOffscreenGLSurface(size);
112 } 105 }
113 106
114 } // namespace init 107 } // namespace init
115 } // namespace gl 108 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_factory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698