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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory.cc
diff --git a/ui/gl/init/gl_factory.cc b/ui/gl/init/gl_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..09cb4ff2ba4dc7e2137930ea702d2d86bca27cdf
--- /dev/null
+++ b/ui/gl/init/gl_factory.cc
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/gl/init/gl_factory.h"
+
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_share_group.h"
+#include "ui/gl/gl_surface.h"
+
+namespace gl {
+namespace init {
+
+// TODO(kylechar): This file should be replaced with a platform specific
+// version for X11, Ozone, Windows, Mac and Android. The implementation of each
+// factory function should be moved into that file and the original static
+// methods should be removed from GLSurface and GLContext. This file can then
+// be deleted.
+
+bool InitializeGLOneOff() {
+ return gfx::GLSurface::InitializeOneOff();
+}
+
+scoped_refptr<gfx::GLContext> CreateGLContext(
+ gfx::GLShareGroup* share_group,
+ gfx::GLSurface* compatible_surface,
+ gfx::GpuPreference gpu_preference) {
+ return gfx::GLContext::CreateGLContext(share_group, compatible_surface,
+ gpu_preference);
+}
+
+scoped_refptr<gfx::GLSurface> CreateViewGLSurface(
+ gfx::AcceleratedWidget window) {
+ return gfx::GLSurface::CreateViewGLSurface(window);
+}
+
+#if defined(USE_OZONE)
+scoped_refptr<gfx::GLSurface> CreateSurfacelessViewGLSurface(
+ gfx::AcceleratedWidget window) {
+ return gfx::GLSurface::CreateSurfacelessViewGLSurface(window);
+}
+#endif // defined(USE_OZONE)
+
+scoped_refptr<gfx::GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
+ return gfx::GLSurface::CreateOffscreenGLSurface(size);
+}
+
+} // namespace init
+} // namespace gl
« 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