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

Unified Diff: ui/gl/gl_context.cc

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: Add missing exports. 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
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index faf1270cfbee4329e1ef11cdde1990993d1004f5..14da5e346d0406e662f2d5fd7e2346fa15e1804f 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -230,4 +230,13 @@ void GLContextReal::SetCurrent(GLSurface* surface) {
current_real_context_.Pointer()->Set(surface ? this : nullptr);
}
+scoped_refptr<GLContext> InitializeGLContext(GLContext* raw_context,
+ GLSurface* compatible_surface,
+ GpuPreference gpu_preference) {
+ scoped_refptr<GLContext> context(raw_context);
+ if (!context->Initialize(compatible_surface, gpu_preference))
+ return nullptr;
+ return context;
+}
+
} // namespace gl
« ui/gl/gl_context.h ('K') | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698