| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index 8c29342ab408e2f0e10fb0ff370807d449c5646c..c8aa3cdb601640953ad496a08babb8588cc3308a 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -25,6 +25,10 @@
|
| #include "ui/gl/gl_switches.h"
|
| #include "ui/gl/scoped_make_current.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "ui/gl/android/gl_factory_android.h"
|
| +#endif
|
| +
|
| #if defined(USE_X11)
|
| extern "C" {
|
| #include <X11/Xlib.h>
|
| @@ -647,7 +651,15 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) {
|
| if(surface->Initialize(sync_provider))
|
| return surface;
|
| } else {
|
| - scoped_refptr<GLSurface> surface = new GLSurfaceStub();
|
| + scoped_refptr<GLSurface> surface;
|
| +
|
| +#if defined(OS_ANDROID)
|
| + if (GLFactoryAndroid* factory = GLFactoryAndroid::GetCurrent())
|
| + surface = factory->CreateNonOwnedViewSurface();
|
| +#endif
|
| +
|
| + if (!surface)
|
| + surface = new GLSurfaceStub();
|
| if (surface->Initialize())
|
| return surface;
|
| }
|
|
|