| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child/child_gpu_memory_buffer_manager.h" | 5 #include "content/child/child_gpu_memory_buffer_manager.h" |
| 6 | 6 |
| 7 #include "content/child/child_thread.h" | 7 #include "content/child/child_thread.h" |
| 8 #include "content/common/child_process_messages.h" | 8 #include "content/common/child_process_messages.h" |
| 9 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" | 9 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 size, | 53 size, |
| 54 format, | 54 format, |
| 55 base::Bind( | 55 base::Bind( |
| 56 &DeletedGpuMemoryBuffer, sender_, handle.type, handle.global_id))); | 56 &DeletedGpuMemoryBuffer, sender_, handle.type, handle.global_id))); |
| 57 if (!buffer) { | 57 if (!buffer) { |
| 58 sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer( | 58 sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer( |
| 59 handle.type, handle.global_id)); | 59 handle.type, handle.global_id)); |
| 60 return scoped_ptr<gfx::GpuMemoryBuffer>(); | 60 return scoped_ptr<gfx::GpuMemoryBuffer>(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 return buffer.PassAs<gfx::GpuMemoryBuffer>(); | 63 return buffer.Pass(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 gfx::GpuMemoryBuffer* | 66 gfx::GpuMemoryBuffer* |
| 67 ChildGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer( | 67 ChildGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer( |
| 68 ClientBuffer buffer) { | 68 ClientBuffer buffer) { |
| 69 return GpuMemoryBufferImpl::FromClientBuffer(buffer); | 69 return GpuMemoryBufferImpl::FromClientBuffer(buffer); |
| 70 } | 70 } |
| 71 | 71 |
| 72 } // namespace content | 72 } // namespace content |
| OLD | NEW |