| 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 #include "content/common/child_process_host_impl.h" | 5 #include "content/common/child_process_host_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 void ChildProcessHostImpl::OnShutdownRequest() { | 302 void ChildProcessHostImpl::OnShutdownRequest() { |
| 303 if (delegate_->CanShutdown()) | 303 if (delegate_->CanShutdown()) |
| 304 Send(new ChildProcessMsg_Shutdown()); | 304 Send(new ChildProcessMsg_Shutdown()); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( | 307 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( |
| 308 uint32 width, | 308 uint32 width, |
| 309 uint32 height, | 309 uint32 height, |
| 310 uint32 internalformat, | 310 uint32 internalformat, |
| 311 gfx::GpuMemoryBuffer::Usage usage, |
| 311 gfx::GpuMemoryBufferHandle* handle) { | 312 gfx::GpuMemoryBufferHandle* handle) { |
| 312 handle->type = gfx::SHARED_MEMORY_BUFFER; | 313 handle->type = gfx::SHARED_MEMORY_BUFFER; |
| 313 AllocateSharedMemory( | 314 AllocateSharedMemory( |
| 314 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat), | 315 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat), |
| 315 peer_handle_, | 316 peer_handle_, |
| 316 &handle->handle); | 317 &handle->handle); |
| 317 } | 318 } |
| 318 | 319 |
| 319 } // namespace content | 320 } // namespace content |
| OLD | NEW |