| Index: app/gfx/gl/gl_context_osmesa.cc
 | 
| ===================================================================
 | 
| --- app/gfx/gl/gl_context_osmesa.cc	(revision 49195)
 | 
| +++ app/gfx/gl/gl_context_osmesa.cc	(working copy)
 | 
| @@ -2,11 +2,9 @@
 | 
|  // Use of this source code is governed by a BSD-style license that can be
 | 
|  // found in the LICENSE file.
 | 
|  
 | 
| -#include <GL/glew.h>
 | 
| -#include <GL/osmew.h>
 | 
| -
 | 
|  #include <algorithm>
 | 
|  
 | 
| +#include "app/gfx/gl/gl_bindings.h"
 | 
|  #include "app/gfx/gl/gl_context_osmesa.h"
 | 
|  
 | 
|  namespace gfx {
 | 
| @@ -18,14 +16,17 @@
 | 
|  OSMesaGLContext::~OSMesaGLContext() {
 | 
|  }
 | 
|  
 | 
| -bool OSMesaGLContext::Initialize(void* shared_handle) {
 | 
| +bool OSMesaGLContext::Initialize(GLContext* shared_context) {
 | 
|    DCHECK(!context_);
 | 
|  
 | 
|    size_ = gfx::Size(1, 1);
 | 
|    buffer_.reset(new int32[1]);
 | 
|  
 | 
| -  context_ = OSMesaCreateContext(GL_RGBA,
 | 
| -                                 static_cast<OSMesaContext>(shared_handle));
 | 
| +  OSMesaContext shared_handle = NULL;
 | 
| +  if (shared_context)
 | 
| +    shared_handle = static_cast<OSMesaContext>(shared_context->GetHandle());
 | 
| +
 | 
| +  context_ = OSMesaCreateContext(GL_RGBA, shared_handle);
 | 
|    if (!context_)
 | 
|      return false;
 | 
|  
 | 
| @@ -34,11 +35,6 @@
 | 
|      return false;
 | 
|    }
 | 
|  
 | 
| -  if (!InitializeGLEW()) {
 | 
| -    Destroy();
 | 
| -    return false;
 | 
| -  }
 | 
| -
 | 
|    if (!InitializeCommon()) {
 | 
|      Destroy();
 | 
|      return false;
 | 
| 
 |