| Index: gpu/ipc/service/gpu_command_buffer_stub.cc
|
| diff --git a/gpu/ipc/service/gpu_command_buffer_stub.cc b/gpu/ipc/service/gpu_command_buffer_stub.cc
|
| index 3f41a30555095398eacb3ddab053551bfa5bfb3d..b05dfd5aec2268ac013687a2d673606fb05f0945 100644
|
| --- a/gpu/ipc/service/gpu_command_buffer_stub.cc
|
| +++ b/gpu/ipc/service/gpu_command_buffer_stub.cc
|
| @@ -530,15 +530,17 @@ void GpuCommandBufferStub::Destroy() {
|
| for (auto& observer : destruction_observers_)
|
| observer.OnWillDestroyStub();
|
|
|
| + // Remove this after crbug.com/248395 is sorted out.
|
| + // Destroy the surface before the context, some surface destructors make GL
|
| + // calls.
|
| + surface_ = nullptr;
|
| +
|
| if (decoder_) {
|
| decoder_->Destroy(have_context);
|
| decoder_.reset();
|
| }
|
|
|
| command_buffer_.reset();
|
| -
|
| - // Remove this after crbug.com/248395 is sorted out.
|
| - surface_ = NULL;
|
| }
|
|
|
| bool GpuCommandBufferStub::Initialize(
|
| @@ -654,9 +656,10 @@ bool GpuCommandBufferStub::Initialize(
|
| }
|
| // This should be either:
|
| // (1) a non-virtual GL context, or
|
| - // (2) a mock context.
|
| + // (2) a mock/stub context.
|
| DCHECK(context->GetHandle() ||
|
| - gl::GetGLImplementation() == gl::kGLImplementationMockGL);
|
| + gl::GetGLImplementation() == gl::kGLImplementationMockGL ||
|
| + gl::GetGLImplementation() == gl::kGLImplementationStubGL);
|
| context = new GLContextVirtual(
|
| gl_share_group, context.get(), decoder_->AsWeakPtr());
|
| if (!context->Initialize(
|
|
|