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

Unified Diff: content/common/child_process_host_impl.cc

Issue 1008563003: Simplify an IPC handler which doesn't need _DELAY_REPLY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « content/common/child_process_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index b58475af2468ccae25d5812e3ef95b29ccace4ee..69a63507f5866808d58339dc9aa9f17ccc654caa 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -254,9 +254,8 @@ bool ChildProcessHostImpl::OnMessageReceived(const IPC::Message& msg) {
OnShutdownRequest)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory,
OnAllocateSharedMemory)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(
- ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer,
- OnAllocateGpuMemoryBuffer)
+ IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer,
+ OnAllocateGpuMemoryBuffer)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DeletedGpuMemoryBuffer,
OnDeletedGpuMemoryBuffer)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -317,25 +316,20 @@ void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
uint32 height,
gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage,
- IPC::Message* reply) {
+ gfx::GpuMemoryBufferHandle* handle) {
// TODO(reveman): Add support for other types of GpuMemoryBuffers.
reveman 2015/03/25 20:57:31 FYI, I'll have to change it back to _DELAY_REPLY w
jam 2015/03/25 22:26:14 oh if you're going to change this, i can close thi
- gfx::GpuMemoryBufferHandle handle;
// AllocateForChildProcess() will check if |width| and |height| are valid
// and handle failure in a controlled way when not. We just need to make
// sure |format| and |usage| are supported here.
if (GpuMemoryBufferImplSharedMemory::IsFormatSupported(format) &&
usage == gfx::GpuMemoryBuffer::MAP) {
- handle = GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
+ *handle = GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
g_next_gpu_memory_buffer_id.GetNext(),
gfx::Size(width, height),
format,
peer_process_.Handle());
}
-
- ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply,
- handle);
- Send(reply);
}
void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer(
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698