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 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2323 return; | 2323 return; |
2324 } | 2324 } |
2325 } | 2325 } |
2326 #endif | 2326 #endif |
2327 | 2327 |
2328 GpuMemoryBufferImpl::AllocateForChildProcess( | 2328 GpuMemoryBufferImpl::AllocateForChildProcess( |
2329 gfx::Size(width, height), | 2329 gfx::Size(width, height), |
2330 internalformat, | 2330 internalformat, |
2331 usage, | 2331 usage, |
2332 GetHandle(), | 2332 GetHandle(), |
| 2333 GetID(), |
2333 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, | 2334 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, |
2334 weak_factory_.GetWeakPtr(), | 2335 weak_factory_.GetWeakPtr(), |
2335 reply)); | 2336 reply)); |
2336 } | 2337 } |
2337 | 2338 |
2338 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2339 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
2339 IPC::Message* reply, | 2340 IPC::Message* reply, |
2340 const gfx::GpuMemoryBufferHandle& handle) { | 2341 const gfx::GpuMemoryBufferHandle& handle) { |
2341 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2342 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2342 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2343 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
2343 handle); | 2344 handle); |
2344 Send(reply); | 2345 Send(reply); |
2345 } | 2346 } |
2346 | 2347 |
2347 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2348 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
2348 gfx::GpuMemoryBufferType type, | 2349 gfx::GpuMemoryBufferType type, |
2349 const gfx::GpuMemoryBufferId& id) { | 2350 const gfx::GpuMemoryBufferId& id) { |
2350 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2351 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2351 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2352 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
2352 } | 2353 } |
2353 | 2354 |
2354 } // namespace content | 2355 } // namespace content |
OLD | NEW |