OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2236 return; | 2236 return; |
2237 } | 2237 } |
2238 } | 2238 } |
2239 #endif | 2239 #endif |
2240 | 2240 |
2241 GpuMemoryBufferImpl::AllocateForChildProcess( | 2241 GpuMemoryBufferImpl::AllocateForChildProcess( |
2242 gfx::Size(width, height), | 2242 gfx::Size(width, height), |
2243 internalformat, | 2243 internalformat, |
2244 usage, | 2244 usage, |
2245 GetHandle(), | 2245 GetHandle(), |
| 2246 GetID(), |
2246 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, | 2247 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, |
2247 weak_factory_.GetWeakPtr(), | 2248 weak_factory_.GetWeakPtr(), |
2248 reply)); | 2249 reply)); |
2249 } | 2250 } |
2250 | 2251 |
2251 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2252 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
2252 IPC::Message* reply, | 2253 IPC::Message* reply, |
2253 const gfx::GpuMemoryBufferHandle& handle) { | 2254 const gfx::GpuMemoryBufferHandle& handle) { |
2254 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2255 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2255 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2256 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
2256 handle); | 2257 handle); |
2257 Send(reply); | 2258 Send(reply); |
2258 } | 2259 } |
2259 | 2260 |
2260 } // namespace content | 2261 } // namespace content |
OLD | NEW |