Chromium Code Reviews| Index: gpu/ipc/service/gpu_command_buffer_stub.cc |
| diff --git a/gpu/ipc/service/gpu_command_buffer_stub.cc b/gpu/ipc/service/gpu_command_buffer_stub.cc |
| index b90275aae15abbc1372ac069b8c65cde9758b463..2172f4a9763461b1b2699546b41fb74714c41674 100644 |
| --- a/gpu/ipc/service/gpu_command_buffer_stub.cc |
| +++ b/gpu/ipc/service/gpu_command_buffer_stub.cc |
| @@ -295,8 +295,9 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { |
| OnInitialize); |
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_SetGetBuffer, |
| OnSetGetBuffer); |
| - IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_ProduceFrontBuffer, |
| - OnProduceFrontBuffer); |
| + IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_TakeFrontBuffer, OnTakeFrontBuffer); |
| + IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_ReturnFrontBuffer, |
| + OnReturnFrontBuffer); |
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_WaitForTokenInRange, |
| OnWaitForTokenInRange); |
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_WaitForGetOffsetInRange, |
| @@ -714,14 +715,22 @@ void GpuCommandBufferStub::OnSetGetBuffer(int32_t shm_id, |
| Send(reply_message); |
| } |
| -void GpuCommandBufferStub::OnProduceFrontBuffer(const Mailbox& mailbox) { |
| - TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnProduceFrontBuffer"); |
| +void GpuCommandBufferStub::OnTakeFrontBuffer(const Mailbox& mailbox) { |
| + TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnTakeFrontBuffer"); |
| if (!decoder_) { |
| - LOG(ERROR) << "Can't produce front buffer before initialization."; |
| + LOG(ERROR) << "Can't take front buffer before initialization."; |
| return; |
| } |
| - decoder_->ProduceFrontBuffer(mailbox); |
| + decoder_->TakeFrontBuffer(mailbox); |
| +} |
| + |
| +void GpuCommandBufferStub::OnReturnFrontBuffer(const Mailbox& mailbox, |
| + const SyncToken& sync_token, |
| + bool is_lost) { |
| + OnWaitFenceSync(sync_token.namespace_id(), sync_token.command_buffer_id(), |
| + sync_token.release_count()); |
|
piman
2016/05/03 02:52:04
Oh, duh, sorry I missed this. OnWaitFenceSync can'
erikchen
2016/05/03 17:24:14
Ah, good point. I went with your second approach a
|
| + decoder_->ReturnFrontBuffer(mailbox, is_lost); |
| } |
| void GpuCommandBufferStub::OnParseError() { |