| Index: cc/test/test_context_provider.cc
|
| diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc
|
| index 734ef790c1aa2a8e5702746ddf0b36bf37f817c0..0f33127236645ebe5a104a82b00bdcaa4a628a17 100644
|
| --- a/cc/test/test_context_provider.cc
|
| +++ b/cc/test/test_context_provider.cc
|
| @@ -15,8 +15,9 @@
|
| #include "base/logging.h"
|
| #include "cc/test/test_gles2_interface.h"
|
| #include "cc/test/test_web_graphics_context_3d.h"
|
| +#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
|
| #include "third_party/skia/include/gpu/GrContext.h"
|
| -#include "third_party/skia/include/gpu/gl/SkNullGLContext.h"
|
| +#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
|
|
|
| namespace cc {
|
|
|
| @@ -112,10 +113,13 @@ class GrContext* TestContextProvider::GrContext() {
|
| if (gr_context_)
|
| return gr_context_.get();
|
|
|
| - scoped_ptr<class SkGLContext> gl_context(SkNullGLContext::Create());
|
| - gl_context->makeCurrent();
|
| + skia::RefPtr<GrGLInterface> gr_gl_interface =
|
| + skia::AdoptRef(new GrGLInterface);
|
| + skia_bindings::InitGLES2InterfaceBindings(gr_gl_interface.get(), ContextGL());
|
| +
|
| gr_context_ = skia::AdoptRef(GrContext::Create(
|
| - kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(gl_context->gl())));
|
| + kOpenGL_GrBackend,
|
| + reinterpret_cast<GrBackendContext>(gr_gl_interface.get())));
|
|
|
| // If GlContext is already lost, also abandon the new GrContext.
|
| if (ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
|
|
|