Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
similarity index 52% |
copy from content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h |
copy to content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
index a7868c15ea39a36ee55f5f071ae9ff88d811e465..56c44c56dd50468bbb343ae4fe12711b257ebbc0 100644 |
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h |
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h |
@@ -2,33 +2,33 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
-#define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
+#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_H_ |
+#define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_H_ |
#include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
namespace content { |
-// Implementation of GPU memory buffer based on shared memory. |
reveman
2014/08/13 08:03:11
Please include a comment like this for consistency
achaulk
2014/08/13 15:53:20
Done.
|
-class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
+class GpuMemoryBufferImplOzoneNativeBuffer : public GpuMemoryBufferImpl { |
public: |
- GpuMemoryBufferImplSharedMemory(const gfx::Size& size, |
- unsigned internalformat); |
- virtual ~GpuMemoryBufferImplSharedMemory(); |
+ GpuMemoryBufferImplOzoneNativeBuffer(const gfx::Size& size, |
+ unsigned internalformat); |
+ virtual ~GpuMemoryBufferImplOzoneNativeBuffer(); |
// Allocates a shared memory backed GPU memory buffer with |size| and |
// |internalformat| for use by |child_process|. |
reveman
2014/08/13 08:03:11
Please update comment.
|
static void AllocateSharedMemoryForChildProcess( |
reveman
2014/08/13 08:03:11
This is not named properly. AllocateOzoneNativeBuf
achaulk
2014/08/13 15:53:20
Done.
|
const gfx::Size& size, |
unsigned internalformat, |
+ unsigned usage, |
base::ProcessHandle child_process, |
+ int child_id, |
+ GpuMemoryBufferFactoryHost* factory_host, |
const AllocationCallback& callback); |
- static bool IsLayoutSupported(const gfx::Size& size, unsigned internalformat); |
+ static bool IsFormatSupported(unsigned internalformat); |
static bool IsUsageSupported(unsigned usage); |
- static bool IsConfigurationSupported(const gfx::Size& size, |
- unsigned internalformat, |
- unsigned usage); |
+ static bool IsConfigurationSupported(unsigned internalformat, unsigned usage); |
bool Initialize(); |
reveman
2014/08/13 08:03:11
remove this function if not supported.
achaulk
2014/08/13 15:53:20
Done.
|
bool InitializeFromHandle(const gfx::GpuMemoryBufferHandle& handle); |
@@ -40,11 +40,11 @@ class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; |
private: |
- scoped_ptr<base::SharedMemory> shared_memory_; |
+ gfx::GpuMemoryBufferId id_; |
- DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); |
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzoneNativeBuffer); |
}; |
} // namespace content |
-#endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
+#endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_H_ |