| 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 GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ | 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
| 6 #define GPU_IPC_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 <memory> | 10 #include <memory> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 gfx::GpuMemoryBufferHandle* handle); | 50 gfx::GpuMemoryBufferHandle* handle); |
| 51 | 51 |
| 52 // Overridden from gfx::GpuMemoryBuffer: | 52 // Overridden from gfx::GpuMemoryBuffer: |
| 53 bool Map() override; | 53 bool Map() override; |
| 54 void* memory(size_t plane) override; | 54 void* memory(size_t plane) override; |
| 55 void Unmap() override; | 55 void Unmap() override; |
| 56 int stride(size_t plane) const override; | 56 int stride(size_t plane) const override; |
| 57 gfx::GpuMemoryBufferHandle GetHandle() const override; | 57 gfx::GpuMemoryBufferHandle GetHandle() const override; |
| 58 base::trace_event::MemoryAllocatorDumpGuid GetGUIDForTracing( | 58 base::trace_event::MemoryAllocatorDumpGuid GetGUIDForTracing( |
| 59 uint64_t tracing_process_id) const override; | 59 uint64_t tracing_process_id) const override; |
| 60 base::SharedMemory* GetSharedMemory() override; |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 GpuMemoryBufferImplSharedMemory( | 63 GpuMemoryBufferImplSharedMemory( |
| 63 gfx::GpuMemoryBufferId id, | 64 gfx::GpuMemoryBufferId id, |
| 64 const gfx::Size& size, | 65 const gfx::Size& size, |
| 65 gfx::BufferFormat format, | 66 gfx::BufferFormat format, |
| 66 const DestructionCallback& callback, | 67 const DestructionCallback& callback, |
| 67 std::unique_ptr<base::SharedMemory> shared_memory, | 68 std::unique_ptr<base::SharedMemory> shared_memory, |
| 68 size_t offset, | 69 size_t offset, |
| 69 int stride); | 70 int stride); |
| 70 | 71 |
| 71 std::unique_ptr<base::SharedMemory> shared_memory_; | 72 std::unique_ptr<base::SharedMemory> shared_memory_; |
| 72 size_t offset_; | 73 size_t offset_; |
| 73 int stride_; | 74 int stride_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); | 76 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace gpu | 79 } // namespace gpu |
| 79 | 80 |
| 80 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ | 81 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
| OLD | NEW |