Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
index bcdc58b4b8edab0535123fc4f6cbde304a779f7b..7f13f23a855c172ffeaae680ace6daaa2b039675 100644 |
--- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
@@ -12,33 +12,28 @@ namespace content { |
// Implementation of GPU memory buffer based on Ozone native buffers. |
class GpuMemoryBufferImplOzoneNativeBuffer : public GpuMemoryBufferImpl { |
public: |
- GpuMemoryBufferImplOzoneNativeBuffer(const gfx::Size& size, |
- unsigned internalformat); |
- virtual ~GpuMemoryBufferImplOzoneNativeBuffer(); |
- |
- // Create an ozone native buffer backed GPU memory buffer with |size| and |
- // |internalformat| for |usage| by current process using |client_id|. |
static void Create(const gfx::Size& size, |
unsigned internalformat, |
unsigned usage, |
int client_id, |
const CreationCallback& callback); |
- // Allocate an ozone native buffer backed GPU memory buffer with |size| and |
- // |internalformat| for |usage| by a child process using |child_client_id|. |
- static void AllocateOzoneNativeBufferForChildProcess( |
+ static void AllocateForChildProcess(const gfx::Size& size, |
+ unsigned internalformat, |
+ unsigned usage, |
+ int child_client_id, |
+ const AllocationCallback& callback); |
+ |
+ static scoped_ptr<GpuMemoryBufferImpl> CreateFromHandle( |
+ const gfx::GpuMemoryBufferHandle& handle, |
const gfx::Size& size, |
unsigned internalformat, |
- unsigned usage, |
- int child_client_id, |
- const AllocationCallback& callback); |
+ const DestructionCallback& callback); |
static bool IsFormatSupported(unsigned internalformat); |
static bool IsUsageSupported(unsigned usage); |
static bool IsConfigurationSupported(unsigned internalformat, unsigned usage); |
- bool InitializeFromHandle(const gfx::GpuMemoryBufferHandle& handle); |
- |
// Overridden from gfx::GpuMemoryBuffer: |
virtual void* Map() OVERRIDE; |
virtual void Unmap() OVERRIDE; |
@@ -46,6 +41,12 @@ class GpuMemoryBufferImplOzoneNativeBuffer : public GpuMemoryBufferImpl { |
virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; |
private: |
+ GpuMemoryBufferImplOzoneNativeBuffer(const gfx::Size& size, |
+ unsigned internalformat, |
+ const DestructionCallback& callback, |
+ const gfx::GpuMemoryBufferId& id); |
+ virtual ~GpuMemoryBufferImplOzoneNativeBuffer(); |
+ |
gfx::GpuMemoryBufferId id_; |
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzoneNativeBuffer); |