| Index: cc/test/test_in_process_context_provider.cc
|
| diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
|
| index c3a02ad09f3651f57e8ebb76e14b7adf4fc5cb15..490e5bb57633a1d7523d9204e9aad7a98412a3fc 100644
|
| --- a/cc/test/test_in_process_context_provider.cc
|
| +++ b/cc/test/test_in_process_context_provider.cc
|
| @@ -15,7 +15,7 @@
|
| #include "gpu/command_buffer/client/gles2_implementation.h"
|
| #include "gpu/command_buffer/client/gles2_lib.h"
|
| #include "gpu/command_buffer/common/gles2_cmd_utils.h"
|
| -#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
|
| +#include "gpu/skia_bindings/grcontext_for_gles2_interface.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| #include "third_party/khronos/GLES2/gl2ext.h"
|
| #include "third_party/skia/include/gpu/GrContext.h"
|
| @@ -66,8 +66,6 @@ TestInProcessContextProvider::TestInProcessContextProvider(
|
| (shared_context ? shared_context->context_.get() : nullptr))) {}
|
|
|
| TestInProcessContextProvider::~TestInProcessContextProvider() {
|
| - if (gr_context_)
|
| - gr_context_->releaseResourcesAndAbandonContext();
|
| }
|
|
|
| bool TestInProcessContextProvider::BindToCurrentThread() { return true; }
|
| @@ -82,20 +80,15 @@ gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() {
|
|
|
| class GrContext* TestInProcessContextProvider::GrContext() {
|
| if (gr_context_)
|
| - return gr_context_.get();
|
| -
|
| - sk_sp<GrGLInterface> interface(
|
| - skia_bindings::CreateGLES2InterfaceBindings(ContextGL()));
|
| + return gr_context_->get();
|
|
|
| - gr_context_ = skia::AdoptRef(GrContext::Create(
|
| - // GrContext takes ownership of |interface|.
|
| - kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
|
| - return gr_context_.get();
|
| + gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL()));
|
| + return gr_context_->get();
|
| }
|
|
|
| void TestInProcessContextProvider::InvalidateGrContext(uint32_t state) {
|
| if (gr_context_)
|
| - gr_context_->resetContext(state);
|
| + gr_context_->ResetContext(state);
|
| }
|
|
|
| void TestInProcessContextProvider::SetupLock() {
|
| @@ -126,7 +119,7 @@ TestInProcessContextProvider::ContextCapabilities() {
|
|
|
| void TestInProcessContextProvider::DeleteCachedResources() {
|
| if (gr_context_)
|
| - gr_context_->freeGpuResources();
|
| + gr_context_->FreeGpuResources();
|
| }
|
|
|
| void TestInProcessContextProvider::SetLostContextCallback(
|
|
|