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

Unified Diff: ui/gl/gl_context.h

Issue 2037793002: Move GLContext creation from //ui/gl to //ui/gl/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gl_init
Patch Set: Change to scoped_refptr. 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_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.h
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index c5d517690fd5a8e0a14cac80a0bed019f91f5c4c..ba921e3d79c03e7ee22aedaac2953ec0669a7267 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -198,6 +198,14 @@ class GL_EXPORT GLContextReal : public GLContext {
DISALLOW_COPY_AND_ASSIGN(GLContextReal);
};
+// Wraps GLContext in scoped_refptr and tries to initializes it. Returns a
+// scoped_refptr containing the initialized GLContext or nullptr if
+// initialization fails.
+GL_EXPORT scoped_refptr<GLContext> InitializeGLContext(
+ scoped_refptr<GLContext> context,
+ GLSurface* compatible_surface,
+ GpuPreference gpu_preference);
+
} // namespace gl
#endif // UI_GL_GL_CONTEXT_H_
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698