summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_command_buffer_stub.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-01 09:06:43 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-01 09:06:43 +0000
commit046fa1ac81455233e53b629f2160ca9eab08e741 (patch)
treeb9376b2320f2fd801a71580f9325bf31ee950359 /content/common/gpu/gpu_command_buffer_stub.cc
parent966a3c6eda39c487da641e1b5e4ccba06802e3ba (diff)
downloadchromium_src-046fa1ac81455233e53b629f2160ca9eab08e741.zip
chromium_src-046fa1ac81455233e53b629f2160ca9eab08e741.tar.gz
chromium_src-046fa1ac81455233e53b629f2160ca9eab08e741.tar.bz2
Remove CommandBuffer::GetTransferBuffer.
The only time we call GetTransferBuffer is on Pepper, right after CreateTransferBuffer, so combine the two. This lets us dramatically remove all the maintenance burden (maps) and extra IPCs. Also separate service-only calls out of CommandBuffer, into CommandBufferServiceBase BUG=None Review URL: https://codereview.chromium.org/215803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_command_buffer_stub.cc')
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index b44fa02..b267575 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -203,8 +203,6 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
OnRegisterTransferBuffer);
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyTransferBuffer,
OnDestroyTransferBuffer);
- IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer,
- OnGetTransferBuffer);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder,
OnCreateVideoDecoder)
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible,
@@ -707,40 +705,6 @@ void GpuCommandBufferStub::OnDestroyTransferBuffer(int32 id) {
command_buffer_->DestroyTransferBuffer(id);
}
-void GpuCommandBufferStub::OnGetTransferBuffer(
- int32 id,
- IPC::Message* reply_message) {
- TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnGetTransferBuffer");
- if (command_buffer_) {
- base::SharedMemoryHandle transfer_buffer = base::SharedMemoryHandle();
- uint32 size = 0;
-
- scoped_refptr<gpu::Buffer> buffer = command_buffer_->GetTransferBuffer(id);
- if (buffer && buffer->shared_memory()) {
-#if defined(OS_WIN)
- transfer_buffer = NULL;
- BrokerDuplicateHandle(buffer->shared_memory()->handle(),
- channel_->renderer_pid(),
- &transfer_buffer,
- FILE_MAP_READ | FILE_MAP_WRITE,
- 0);
- DCHECK(transfer_buffer != NULL);
-#else
- buffer->shared_memory()->ShareToProcess(channel_->renderer_pid(),
- &transfer_buffer);
-#endif
- size = buffer->size();
- }
-
- GpuCommandBufferMsg_GetTransferBuffer::WriteReplyParams(reply_message,
- transfer_buffer,
- size);
- } else {
- reply_message->set_reply_error();
- }
- Send(reply_message);
-}
-
void GpuCommandBufferStub::OnCommandProcessed() {
if (watchdog_)
watchdog_->CheckArmed();