| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |