| Index: ui/gfx/gl/gl_context_win.cc | 
| =================================================================== | 
| --- ui/gfx/gl/gl_context_win.cc	(revision 81471) | 
| +++ ui/gfx/gl/gl_context_win.cc	(working copy) | 
| @@ -17,6 +17,7 @@ | 
| #include "ui/gfx/gl/gl_context_osmesa.h" | 
| #include "ui/gfx/gl/gl_context_stub.h" | 
| #include "ui/gfx/gl/gl_implementation.h" | 
| +#include "ui/gfx/gl/gl_surface_egl.h" | 
|  | 
| namespace gfx { | 
|  | 
| @@ -132,10 +133,6 @@ | 
| static int g_regular_pixel_format = 0; | 
| static int g_multisampled_pixel_format = 0; | 
|  | 
| -// When using ANGLE we still need a window for D3D. This context creates the | 
| -// D3D device. | 
| -static BaseEGLContext* g_default_context; | 
| - | 
| const PIXELFORMATDESCRIPTOR kPixelFormatDescriptor = { | 
| sizeof(kPixelFormatDescriptor),    // Size of structure. | 
| 1,                       // Default version. | 
| @@ -313,8 +310,8 @@ | 
| break; | 
| } | 
| case kGLImplementationEGLGLES2: | 
| -      if (!BaseEGLContext::InitializeOneOff()) { | 
| -        LOG(ERROR) << "BaseEGLContext::InitializeOneOff failed."; | 
| +      if (!GLSurfaceEGL::InitializeOneOff()) { | 
| +        LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; | 
| return false; | 
| } | 
| break; | 
| @@ -551,11 +548,16 @@ | 
| return context.release(); | 
| } | 
| case kGLImplementationEGLGLES2: { | 
| -      scoped_ptr<NativeViewEGLContext> context( | 
| -          new NativeViewEGLContext(window)); | 
| -      if (!context->Initialize()) | 
| +      scoped_ptr<NativeViewGLSurfaceEGL> surface(new NativeViewGLSurfaceEGL( | 
| +          window)); | 
| +      if (!surface->Initialize()) | 
| return NULL; | 
|  | 
| +      scoped_ptr<GLContextEGL> context( | 
| +          new GLContextEGL(surface.release())); | 
| +      if (!context->Initialize(NULL)) | 
| +        return NULL; | 
| + | 
| return context.release(); | 
| } | 
| case kGLImplementationDesktopGL: { | 
| @@ -706,20 +708,12 @@ | 
| return context.release(); | 
| } | 
| case kGLImplementationEGLGLES2: { | 
| -      if (!shared_context) { | 
| -        if (!g_default_context) { | 
| -          scoped_ptr<NativeViewEGLContext> default_context( | 
| -              new NativeViewEGLContext(g_window)); | 
| -          if (!default_context->Initialize()) | 
| -            return NULL; | 
| +      scoped_ptr<PbufferGLSurfaceEGL> surface(new PbufferGLSurfaceEGL( | 
| +          gfx::Size(1, 1))); | 
| +      if (!surface->Initialize()) | 
| +        return NULL; | 
|  | 
| -          g_default_context = default_context.release(); | 
| -        } | 
| -        shared_context = g_default_context; | 
| -      } | 
| - | 
| -      scoped_ptr<SecondaryEGLContext> context( | 
| -          new SecondaryEGLContext()); | 
| +      scoped_ptr<GLContextEGL> context(new GLContextEGL(surface.release())); | 
| if (!context->Initialize(shared_context)) | 
| return NULL; | 
|  | 
|  |