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

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: 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_context.h ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index faf1270cfbee4329e1ef11cdde1990993d1004f5..46d566e42ea4e323a8daf7a19994adb744bbb83f 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -230,4 +230,12 @@ void GLContextReal::SetCurrent(GLSurface* surface) {
current_real_context_.Pointer()->Set(surface ? this : nullptr);
}
+scoped_refptr<GLContext> InitializeGLContext(scoped_refptr<GLContext> context,
+ GLSurface* compatible_surface,
+ GpuPreference gpu_preference) {
+ if (!context->Initialize(compatible_surface, gpu_preference))
+ return nullptr;
+ return context;
+}
+
} // namespace gl
« no previous file with comments | « 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