Index: content/common/gpu/client/command_buffer_proxy_impl.cc |
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc |
index 589fa17c771594e88fa4b32ba177d887ba2ca8a8..74a4089e564874197d31882374b054641a01d6af 100644 |
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc |
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc |
@@ -342,10 +342,11 @@ void CommandBufferProxyImpl::DestroyGpuMemoryBuffer(int32 id) { |
if (last_state_.error != gpu::error::kNoError) |
return; |
- Send(new GpuCommandBufferMsg_DestroyGpuMemoryBuffer(route_id_, id)); |
+ Send(new GpuCommandBufferMsg_UnregisterGpuMemoryBuffer(route_id_, id)); |
// Remove the gpu memory buffer from the client side cache. |
- gpu_memory_buffers_.erase(id); |
+ DCHECK(gpu_memory_buffers_.find(id) != gpu_memory_buffers_.end()); |
+ channel_->factory()->DeleteGpuMemoryBuffer(gpu_memory_buffers_.take(id)); |
} |
int CommandBufferProxyImpl::GetRouteID() const { |