Index: content/common/gpu/client/gpu_memory_buffer_impl_shm.h |
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shm.h b/content/common/gpu/client/gpu_memory_buffer_impl_shm.h |
index 9e2682715c6a9d55bcf72e0299a452e1651ade97..961ab52d5a08ccf9d6cd1897d9958f24cc81abdd 100644 |
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shm.h |
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shm.h |
@@ -9,21 +9,33 @@ |
namespace content { |
-// Provides implementation of a GPU memory buffer based |
-// on a shared memory handle. |
+// Implementation of GPU memory buffer based on shared memory. |
class GpuMemoryBufferImplShm : public GpuMemoryBufferImpl { |
public: |
- GpuMemoryBufferImplShm(gfx::Size size, unsigned internalformat); |
+ GpuMemoryBufferImplShm(const gfx::Size& size, unsigned internalformat); |
virtual ~GpuMemoryBufferImplShm(); |
+ // Allocates a shared memory backed GPU memory buffer with |size| and |
+ // |internalformat| for use by |child_process|. |
+ static void AllocateSharedMemoryForChildProcess( |
+ const gfx::Size& size, |
+ unsigned internalformat, |
+ base::ProcessHandle child_process, |
+ gfx::GpuMemoryBufferHandle* handle); |
+ |
+ static bool IsLayoutSupported(const gfx::Size& size, unsigned internalformat); |
static bool IsUsageSupported(unsigned usage); |
+ static bool IsConfigurationSupported(const gfx::Size& size, |
+ unsigned internalformat, |
+ unsigned usage); |
- bool Initialize(gfx::GpuMemoryBufferHandle handle); |
- bool InitializeFromSharedMemory(scoped_ptr<base::SharedMemory> shared_memory); |
+ bool Initialize(); |
+ bool InitializeFromHandle(gfx::GpuMemoryBufferHandle handle); |
// Overridden from gfx::GpuMemoryBuffer: |
virtual void* Map() OVERRIDE; |
virtual void Unmap() OVERRIDE; |
+ virtual uint32 GetStride() const OVERRIDE; |
virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; |
private: |