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 void ChildProcessHostImpl::OnShutdownRequest() { | 301 void ChildProcessHostImpl::OnShutdownRequest() { |
302 if (delegate_->CanShutdown()) | 302 if (delegate_->CanShutdown()) |
303 Send(new ChildProcessMsg_Shutdown()); | 303 Send(new ChildProcessMsg_Shutdown()); |
304 } | 304 } |
305 | 305 |
306 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( | 306 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( |
307 uint32 width, | 307 uint32 width, |
308 uint32 height, | 308 uint32 height, |
309 uint32 internalformat, | 309 uint32 internalformat, |
310 gfx::GpuMemoryBufferHandle* handle) { | 310 gfx::GpuMemoryBufferHandle* handle) { |
311 handle->type = gfx::SHARED_MEMORY_BUFFER; | 311 // TODO(jun.a.jiang): simply set the type to gfx::SURFACE_TEXTURE_BUFFER |
312 AllocateSharedMemory( | 312 // here and more is needed when this code snippet is reached. |
313 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat), | 313 handle->type = gfx::SURFACE_TEXTURE_BUFFER; |
314 peer_handle_, | |
315 &handle->handle); | |
316 } | 314 } |
317 | 315 |
318 } // namespace content | 316 } // namespace content |
OLD | NEW |