Index: ui/gl/gl_context_ozone.cc |
diff --git a/ui/gl/gl_context_ozone.cc b/ui/gl/gl_context_ozone.cc |
index aeb91953df78b50bdf34af22cb8ced2d5494d8f1..058bb387e88aba238112ed85fd23006c495b8277 100644 |
--- a/ui/gl/gl_context_ozone.cc |
+++ b/ui/gl/gl_context_ozone.cc |
@@ -9,6 +9,7 @@ |
#include "base/sys_info.h" |
#include "ui/gl/gl_bindings.h" |
#include "ui/gl/gl_context_egl.h" |
+#include "ui/gl/gl_context_osmesa.h" |
#include "ui/gl/gl_context_stub.h" |
#include "ui/gl/gl_implementation.h" |
#include "ui/gl/gl_surface.h" |
@@ -23,6 +24,13 @@ scoped_refptr<GLContext> GLContext::CreateGLContext( |
if (GetGLImplementation() == kGLImplementationMockGL) |
return scoped_refptr<GLContext>(new GLContextStub()); |
+ if (GetGLImplementation() == kGLImplementationOSMesaGL) { |
+ scoped_refptr<GLContext> context(new GLContextOSMesa(share_group)); |
+ if (!context->Initialize(compatible_surface, gpu_preference)) |
+ return NULL; |
+ return context; |
+ } |
+ |
scoped_refptr<GLContext> context; |
if (!compatible_surface->GetHandle()) { |
DLOG(ERROR) << "Surface has no associated handle.\n"; |