OLD | NEW |
(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 |
OLD | NEW |