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 62% |
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..7122b3db1e614a6e54f43094ea265384d406b8a3 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,29 +2,31 @@ |
// 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. |
-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|. |
static void AllocateSharedMemoryForChildProcess( |
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, |
@@ -40,11 +42,11 @@ class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; |
private: |
- scoped_ptr<base::SharedMemory> shared_memory_; |
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzoneNativeBuffer); |
reveman
2014/08/12 20:19:11
nit: move this to the bottom for consistency
achaulk
2014/08/12 21:38:02
Done.
|
- DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); |
+ gfx::GpuMemoryBufferId id_; |
}; |
} // 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_ |