| Index: gpu/command_buffer/client/gles2_implementation.cc
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
|
| index b99b332f74f559e299b6bd9c5cff26f12417fc26..d9826c06bf5dfdd14b59dfeecd660c4797ba79b1 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -275,6 +275,10 @@ GLES2Implementation::~GLES2Implementation() {
|
| #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS)
|
| DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]);
|
| #endif
|
| +
|
| + // Release any per-context data in share group.
|
| + share_group_->FreeContext(this);
|
| +
|
| buffer_tracker_.reset();
|
|
|
| // Make sure the commands make it the service.
|
| @@ -2429,7 +2433,7 @@ bool GLES2Implementation::BindBufferHelper(
|
| }
|
| // TODO(gman): There's a bug here. If the target is invalid the ID will not be
|
| // used even though it's marked it as used here.
|
| - GetIdHandler(id_namespaces::kBuffers)->MarkAsUsedForBind(buffer);
|
| + GetIdHandler(id_namespaces::kBuffers)->MarkAsUsedForBind(this, buffer);
|
| return changed;
|
| }
|
|
|
| @@ -2470,7 +2474,8 @@ bool GLES2Implementation::BindFramebufferHelper(
|
| SetGLErrorInvalidEnum("glBindFramebuffer", target, "target");
|
| return false;
|
| }
|
| - GetIdHandler(id_namespaces::kFramebuffers)->MarkAsUsedForBind(framebuffer);
|
| + GetIdHandler(id_namespaces::kFramebuffers)
|
| + ->MarkAsUsedForBind(this, framebuffer);
|
| return changed;
|
| }
|
|
|
| @@ -2491,7 +2496,8 @@ bool GLES2Implementation::BindRenderbufferHelper(
|
| }
|
| // TODO(gman): There's a bug here. If the target is invalid the ID will not be
|
| // used even though it's marked it as used here.
|
| - GetIdHandler(id_namespaces::kRenderbuffers)->MarkAsUsedForBind(renderbuffer);
|
| + GetIdHandler(id_namespaces::kRenderbuffers)
|
| + ->MarkAsUsedForBind(this, renderbuffer);
|
| return changed;
|
| }
|
|
|
| @@ -2526,7 +2532,7 @@ bool GLES2Implementation::BindTextureHelper(GLenum target, GLuint texture) {
|
| }
|
| // TODO(gman): There's a bug here. If the target is invalid the ID will not be
|
| // used. even though it's marked it as used here.
|
| - GetIdHandler(id_namespaces::kTextures)->MarkAsUsedForBind(texture);
|
| + GetIdHandler(id_namespaces::kTextures)->MarkAsUsedForBind(this, texture);
|
| return changed;
|
| }
|
|
|
|
|