| Index: content/common/gpu/gpu_command_buffer_stub.cc
|
| diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
|
| index 16c44053435d6d23e62547e9dd878439b517a28c..2968b85bb893b79fccea5495bbe31f2612834c0d 100644
|
| --- a/content/common/gpu/gpu_command_buffer_stub.cc
|
| +++ b/content/common/gpu/gpu_command_buffer_stub.cc
|
| @@ -88,6 +88,8 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
|
| IPC_BEGIN_MESSAGE_MAP(GpuCommandBufferStub, message)
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_Initialize,
|
| OnInitialize);
|
| + IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_SetGetBuffer,
|
| + OnSetGetBuffer);
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_SetParent,
|
| OnSetParent);
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetState, OnGetState);
|
| @@ -147,26 +149,12 @@ void GpuCommandBufferStub::OnInitializeFailed(IPC::Message* reply_message) {
|
| }
|
|
|
| void GpuCommandBufferStub::OnInitialize(
|
| - base::SharedMemoryHandle ring_buffer,
|
| - int32 size,
|
| IPC::Message* reply_message) {
|
| DCHECK(!command_buffer_.get());
|
|
|
| command_buffer_.reset(new gpu::CommandBufferService);
|
|
|
| -#if defined(OS_WIN)
|
| - // Windows dups the shared memory handle it receives into the current process
|
| - // and closes it when this variable goes out of scope.
|
| - base::SharedMemory shared_memory(ring_buffer,
|
| - false,
|
| - channel_->renderer_process());
|
| -#else
|
| - // POSIX receives a dup of the shared memory handle and closes the dup when
|
| - // this variable goes out of scope.
|
| - base::SharedMemory shared_memory(ring_buffer, false);
|
| -#endif
|
| -
|
| - if (!command_buffer_->Initialize(&shared_memory, size)) {
|
| + if (!command_buffer_->Initialize()) {
|
| OnInitializeFailed(reply_message);
|
| return;
|
| }
|
| @@ -279,6 +267,12 @@ void GpuCommandBufferStub::OnInitialize(
|
| Send(reply_message);
|
| }
|
|
|
| +void GpuCommandBufferStub::OnSetGetBuffer(
|
| + int32 shm_id, IPC::Message* reply_message) {
|
| + scheduler_->SetGetBuffer(shm_id);
|
| + Send(reply_message);
|
| +}
|
| +
|
| void GpuCommandBufferStub::OnSetParent(int32 parent_route_id,
|
| uint32 parent_texture_id,
|
| IPC::Message* reply_message) {
|
|
|