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

Unified Diff: ui/gl/init/gl_factory.h

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/BUILD.gn ('k') | ui/gl/init/gl_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory.h
diff --git a/ui/gl/init/gl_factory.h b/ui/gl/init/gl_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdf6e294652711d420de5436a8ca50a23342e71b
--- /dev/null
+++ b/ui/gl/init/gl_factory.h
@@ -0,0 +1,54 @@
+// 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.
+
+#ifndef UI_GL_INIT_GL_FACTORY_H_
+#define UI_GL_INIT_GL_FACTORY_H_
+
+#include "base/memory/ref_counted.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gl/gpu_preference.h"
+#include "ui/gl/init/gl_init_export.h"
+
+namespace gfx {
+class GLContext;
+class GLShareGroup;
+class GLSurface;
+};
+
+namespace gl {
+namespace init {
+
+// Initialize GL bindings.
+GL_INIT_EXPORT bool InitializeGLOneOff();
+
+// Create a GL context that is compatible with the given surface. |share_group|,
+// if non-NULL, is a group of contexts which the internally created OpenGL
+// context shares textures and other resources.
+GL_INIT_EXPORT scoped_refptr<gfx::GLContext> CreateGLContext(
+ gfx::GLShareGroup* share_group,
+ gfx::GLSurface* compatible_surface,
+ gfx::GpuPreference gpu_preference);
+
+// Create a GL surface that renders directly to a view.
+GL_INIT_EXPORT scoped_refptr<gfx::GLSurface> CreateViewGLSurface(
+ gfx::AcceleratedWidget window);
+
+#if defined(USE_OZONE)
+// Create a GL surface that renders directly into a window with surfaceless
+// semantics - there is no default framebuffer and the primary surface must
+// be presented as an overlay. If surfaceless mode is not supported or
+// enabled it will return a null pointer.
+GL_INIT_EXPORT scoped_refptr<gfx::GLSurface> CreateSurfacelessViewGLSurface(
+ gfx::AcceleratedWidget window);
+#endif // defined(USE_OZONE)
+
+// Create a GL surface used for offscreen rendering.
+GL_INIT_EXPORT scoped_refptr<gfx::GLSurface> CreateOffscreenGLSurface(
+ const gfx::Size& size);
+
+} // namespace init
+} // namespace gl
+
+#endif // UI_GL_INIT_GL_FACTORY_H_
« no previous file with comments | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698