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 |