Chromium Code Reviews| Index: content/common/gpu/client/gpu_memory_buffer_impl.h |
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.h b/content/common/gpu/client/gpu_memory_buffer_impl.h |
| index 3858c3f8db5aaac9ed6d3734694be050628f158e..45049d30bed6077c750c687642d34ec82db02308 100644 |
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.h |
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.h |
| @@ -11,33 +11,29 @@ |
| namespace content { |
| -// Provides common implementation of a GPU memory buffer based |
| -// on a shared memory handle. |
| +// Provides common implementation of a GPU memory buffer. |
| class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { |
| public: |
| - GpuMemoryBufferImpl(scoped_ptr<base::SharedMemory> shared_memory, |
| - size_t width, |
| - size_t height, |
| - unsigned internalformat); |
| + static scoped_ptr<GpuMemoryBufferImpl> Create( |
| + gfx::GpuMemoryBufferHandle handle, |
| + gfx::Size size, |
| + unsigned internalformat); |
| + |
| virtual ~GpuMemoryBufferImpl(); |
| + static bool IsFormatValid(unsigned internalformat); |
|
piman
2013/12/03 02:59:51
This gets hidden by the GpuMemoryBufferImplIOSurfa
reveman
2013/12/03 17:58:32
I think this belongs in GpuMemoryBufferImpl as it'
|
| + static size_t BytesPerPixel(unsigned internalformat); |
| + |
| // Overridden from gfx::GpuMemoryBuffer: |
| - virtual void Map(AccessMode mode, void** vaddr) OVERRIDE; |
| - virtual void Unmap() OVERRIDE; |
| virtual bool IsMapped() const OVERRIDE; |
| virtual uint32 GetStride() const OVERRIDE; |
| - virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; |
| - static bool IsFormatValid(unsigned internalformat); |
| - static size_t BytesPerPixel(unsigned internalformat); |
| + protected: |
| + GpuMemoryBufferImpl(gfx::Size size, unsigned internalformat); |
| - private: |
| - scoped_ptr<base::SharedMemory> shared_memory_; |
| const gfx::Size size_; |
| unsigned internalformat_; |
| bool mapped_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl); |
|
piman
2013/12/03 02:59:51
nit: keep
reveman
2013/12/03 17:58:32
Done.
|
| }; |
| } // namespace content |