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

Unified Diff: ui/gl/gl_surface.h

Issue 2047283003: Move GLSurface creation from //ui/gl to //ui/gl/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gl_context
Patch Set: Fix Ozone CreateViewGLSurface logic. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 49d0acc632066e78021b1367634659e3bb76fb01..c7fbf46e2cd6a2c5de4c595550cc87922df6e9a2 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -193,28 +193,6 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
// the next buffer may be 2 frames old.
virtual bool BuffersFlipped() const;
- // Create a GL surface that renders directly to a view.
- // DEPRECATED(kylechar): Use gl::init::CreateViewGLSurface from gl_factory.h.
- static scoped_refptr<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.
- // DEPRECATED(kylechar): Use gl::init::CreateSurfacelessViewGLSurface from
- // gl_factory.h.
- static scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface(
- gfx::AcceleratedWidget window);
-#endif // defined(USE_OZONE)
-
- // Create a GL surface used for offscreen rendering.
- // DEPRECATED(kylechar): Use gl::init::CreateOffscreenGLSurface from
- // gl_factory.h.
- static scoped_refptr<GLSurface> CreateOffscreenGLSurface(
- const gfx::Size& size);
-
static GLSurface* GetCurrent();
// Called when the swap interval for the associated context changes.
@@ -293,6 +271,12 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface {
DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter);
};
+// Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a
+// scoped_refptr containing the initialized GLSurface or nullptr if
+// initialization fails.
+GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface(
+ scoped_refptr<GLSurface> surface);
+
} // namespace gl
#endif // UI_GL_GL_SURFACE_H_
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698