Index: content/browser/renderer_host/render_message_filter.cc |
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc |
index 78db5e2017cdbf8747b73a848798e8fdcbcf9c7c..f7809743bf08fb7f8f2be158ff772fcbbb2e6b48 100644 |
--- a/content/browser/renderer_host/render_message_filter.cc |
+++ b/content/browser/renderer_host/render_message_filter.cc |
@@ -193,6 +193,8 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER_DELAY_REPLY( |
ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer, |
OnAllocateGpuMemoryBuffer) |
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(ChildProcessHostMsg_SyncCreateGpuFence, |
+ OnCreateGpuFence) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(ChildProcessHostMsg_EstablishGpuChannel, |
OnEstablishGpuChannel) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(ChildProcessHostMsg_HasGpuProcess, |
@@ -691,4 +693,19 @@ void RenderMessageFilter::OnDeletedGpuMemoryBuffer( |
id, PeerHandle(), render_process_id_, sync_token); |
} |
+void RenderMessageFilter::OnCreateGpuFence(IPC::Message* reply) { |
+ DCHECK(BrowserGpuMemoryBufferManager::current()); |
+ |
+ BrowserGpuMemoryBufferManager::current()->CreateGpuFenceForChildProcess( |
+ PeerHandle(), |
+ base::Bind(&RenderMessageFilter::GpuFenceCreated, this, reply)); |
+} |
+ |
+void RenderMessageFilter::GpuFenceCreated(IPC::Message* reply, |
+ const gfx::GpuFenceHandle& handle) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::IO); |
+ ChildProcessHostMsg_SyncCreateGpuFence::WriteReplyParams(reply, handle); |
+ Send(reply); |
+} |
+ |
} // namespace content |