| 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 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 return; | 2233 return; |
| 2234 } | 2234 } |
| 2235 } | 2235 } |
| 2236 #endif | 2236 #endif |
| 2237 | 2237 |
| 2238 GpuMemoryBufferImpl::AllocateForChildProcess( | 2238 GpuMemoryBufferImpl::AllocateForChildProcess( |
| 2239 gfx::Size(width, height), | 2239 gfx::Size(width, height), |
| 2240 internalformat, | 2240 internalformat, |
| 2241 usage, | 2241 usage, |
| 2242 GetHandle(), | 2242 GetHandle(), |
| 2243 GetID(), |
| 2243 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, | 2244 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, |
| 2244 weak_factory_.GetWeakPtr(), | 2245 weak_factory_.GetWeakPtr(), |
| 2245 reply)); | 2246 reply)); |
| 2246 } | 2247 } |
| 2247 | 2248 |
| 2248 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2249 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
| 2249 IPC::Message* reply, | 2250 IPC::Message* reply, |
| 2250 const gfx::GpuMemoryBufferHandle& handle) { | 2251 const gfx::GpuMemoryBufferHandle& handle) { |
| 2251 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2252 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2252 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2253 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
| 2253 handle); | 2254 handle); |
| 2254 Send(reply); | 2255 Send(reply); |
| 2255 } | 2256 } |
| 2256 | 2257 |
| 2257 } // namespace content | 2258 } // namespace content |
| OLD | NEW |