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 { |
11 | 11 |
12 // static | 12 // static |
13 void GpuMemoryBufferImpl::Create(const gfx::Size& size, | 13 void GpuMemoryBufferImpl::Create(const gfx::Size& size, |
14 unsigned internalformat, | 14 unsigned internalformat, |
15 unsigned usage, | 15 unsigned usage, |
| 16 int gpu_client_id, |
16 const CreationCallback& callback) { | 17 const CreationCallback& callback) { |
17 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( | 18 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( |
18 size, internalformat, usage)) { | 19 size, internalformat, usage)) { |
19 GpuMemoryBufferImplSharedMemory::Create( | 20 GpuMemoryBufferImplSharedMemory::Create( |
20 size, internalformat, usage, callback); | 21 size, internalformat, usage, callback); |
21 return; | 22 return; |
22 } | 23 } |
23 | 24 |
24 callback.Run(scoped_ptr<GpuMemoryBufferImpl>()); | 25 callback.Run(scoped_ptr<GpuMemoryBufferImpl>()); |
25 } | 26 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 return scoped_ptr<GpuMemoryBufferImpl>(); | 71 return scoped_ptr<GpuMemoryBufferImpl>(); |
71 | 72 |
72 return buffer.PassAs<GpuMemoryBufferImpl>(); | 73 return buffer.PassAs<GpuMemoryBufferImpl>(); |
73 } | 74 } |
74 default: | 75 default: |
75 return scoped_ptr<GpuMemoryBufferImpl>(); | 76 return scoped_ptr<GpuMemoryBufferImpl>(); |
76 } | 77 } |
77 } | 78 } |
78 | 79 |
79 } // namespace content | 80 } // namespace content |
OLD | NEW |