Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 235503004: gpu: InProcessCommandBuffer::DestroyTransferBuffer thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 0411806916805c306e093b0b6d38f840c067cf31..2fb59f9a817c09ecfd3084e1449efccf72977cec 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -591,13 +591,19 @@ scoped_refptr<Buffer> InProcessCommandBuffer::CreateTransferBuffer(size_t size,
void InProcessCommandBuffer::DestroyTransferBuffer(int32 id) {
CheckSequencedThread();
- base::Closure task = base::Bind(&CommandBuffer::DestroyTransferBuffer,
- base::Unretained(command_buffer_.get()),
- id);
+ base::Closure task =
+ base::Bind(&InProcessCommandBuffer::DestroyTransferBufferOnGputhread,
+ base::Unretained(this),
+ id);
QueueTask(task);
}
+void InProcessCommandBuffer::DestroyTransferBufferOnGputhread(int32 id) {
+ base::AutoLock lock(command_buffer_lock_);
+ command_buffer_->DestroyTransferBuffer(id);
+}
+
gpu::Capabilities InProcessCommandBuffer::GetCapabilities() {
return capabilities_;
}
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698