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 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ | 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ | 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/common/content_export.h" | 11 #include "gpu/gpu_export.h" |
12 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" | 12 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" |
13 | 13 |
14 namespace content { | 14 namespace gpu { |
15 | 15 |
16 // Implementation of GPU memory buffer based on shared memory. | 16 // Implementation of GPU memory buffer based on shared memory. |
17 class CONTENT_EXPORT GpuMemoryBufferImplSharedMemory | 17 class GPU_EXPORT GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
18 : public GpuMemoryBufferImpl { | |
19 public: | 18 public: |
20 ~GpuMemoryBufferImplSharedMemory() override; | 19 ~GpuMemoryBufferImplSharedMemory() override; |
21 | 20 |
22 static scoped_ptr<GpuMemoryBufferImplSharedMemory> Create( | 21 static scoped_ptr<GpuMemoryBufferImplSharedMemory> Create( |
23 gfx::GpuMemoryBufferId id, | 22 gfx::GpuMemoryBufferId id, |
24 const gfx::Size& size, | 23 const gfx::Size& size, |
25 gfx::BufferFormat format, | 24 gfx::BufferFormat format, |
26 const DestructionCallback& callback); | 25 const DestructionCallback& callback); |
27 | 26 |
28 static gfx::GpuMemoryBufferHandle AllocateForChildProcess( | 27 static gfx::GpuMemoryBufferHandle AllocateForChildProcess( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 size_t offset, | 64 size_t offset, |
66 int stride); | 65 int stride); |
67 | 66 |
68 scoped_ptr<base::SharedMemory> shared_memory_; | 67 scoped_ptr<base::SharedMemory> shared_memory_; |
69 size_t offset_; | 68 size_t offset_; |
70 int stride_; | 69 int stride_; |
71 | 70 |
72 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); | 71 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); |
73 }; | 72 }; |
74 | 73 |
75 } // namespace content | 74 } // namespace gpu |
76 | 75 |
77 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ | 76 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
OLD | NEW |