| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/gpu/client/gpu_memory_buffer_impl.h" | 5 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
| 6 | 6 |
| 7 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" | 7 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" |
| 8 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 8 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return; | 53 return; |
| 54 } | 54 } |
| 55 | 55 |
| 56 callback.Run(gfx::GpuMemoryBufferHandle()); | 56 callback.Run(gfx::GpuMemoryBufferHandle()); |
| 57 } | 57 } |
| 58 | 58 |
| 59 // static | 59 // static |
| 60 void GpuMemoryBufferImpl::DeletedByChildProcess( | 60 void GpuMemoryBufferImpl::DeletedByChildProcess( |
| 61 gfx::GpuMemoryBufferType type, | 61 gfx::GpuMemoryBufferType type, |
| 62 const gfx::GpuMemoryBufferId& id, | 62 const gfx::GpuMemoryBufferId& id, |
| 63 base::ProcessHandle child_process) { | 63 base::ProcessHandle child_process, |
| 64 uint32 sync_point) { |
| 64 } | 65 } |
| 65 | 66 |
| 66 // static | 67 // static |
| 67 scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle( | 68 scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle( |
| 68 const gfx::GpuMemoryBufferHandle& handle, | 69 const gfx::GpuMemoryBufferHandle& handle, |
| 69 const gfx::Size& size, | 70 const gfx::Size& size, |
| 70 Format format, | 71 Format format, |
| 71 const DestructionCallback& callback) { | 72 const DestructionCallback& callback) { |
| 72 switch (handle.type) { | 73 switch (handle.type) { |
| 73 case gfx::SHARED_MEMORY_BUFFER: | 74 case gfx::SHARED_MEMORY_BUFFER: |
| 74 return GpuMemoryBufferImplSharedMemory::CreateFromHandle( | 75 return GpuMemoryBufferImplSharedMemory::CreateFromHandle( |
| 75 handle, size, format, callback); | 76 handle, size, format, callback); |
| 76 case gfx::SURFACE_TEXTURE_BUFFER: | 77 case gfx::SURFACE_TEXTURE_BUFFER: |
| 77 return GpuMemoryBufferImplSurfaceTexture::CreateFromHandle( | 78 return GpuMemoryBufferImplSurfaceTexture::CreateFromHandle( |
| 78 handle, size, format, callback); | 79 handle, size, format, callback); |
| 79 default: | 80 default: |
| 80 return scoped_ptr<GpuMemoryBufferImpl>(); | 81 return scoped_ptr<GpuMemoryBufferImpl>(); |
| 81 } | 82 } |
| 82 } | 83 } |
| 83 | 84 |
| 84 } // namespace content | 85 } // namespace content |
| OLD | NEW |