| Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| similarity index 81%
|
| copy from content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
|
| copy to content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| index 24e39a6ce761cfa1cb736228f9e468da6af6ec17..2784685debdba2a57fed5f74d4c92980e6457557 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
|
|
|
| -#include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h"
|
| +#include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h"
|
| #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
|
|
|
| namespace content {
|
| @@ -33,7 +33,14 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
|
| unsigned internalformat,
|
| unsigned usage,
|
| base::ProcessHandle child_process,
|
| + int child_id,
|
| const AllocationCallback& callback) {
|
| + if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(
|
| + internalformat, usage)) {
|
| + GpuMemoryBufferImplOzoneNativeBuffer::AllocateOzoneNativeBufferForChildId(
|
| + size, internalformat, usage, child_id, callback);
|
| + return;
|
| + }
|
| if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
|
| size, internalformat, usage)) {
|
| GpuMemoryBufferImplSharedMemory::AllocateSharedMemoryForChildProcess(
|
| @@ -65,9 +72,9 @@ scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle(
|
|
|
| return buffer.PassAs<GpuMemoryBufferImpl>();
|
| }
|
| - case gfx::IO_SURFACE_BUFFER: {
|
| - scoped_ptr<GpuMemoryBufferImplIOSurface> buffer(
|
| - new GpuMemoryBufferImplIOSurface(size, internalformat));
|
| + case gfx::OZONE_NATIVE_BUFFER: {
|
| + scoped_ptr<GpuMemoryBufferImplOzoneNativeBuffer> buffer(
|
| + new GpuMemoryBufferImplOzoneNativeBuffer(size, internalformat));
|
| if (!buffer->InitializeFromHandle(handle))
|
| return scoped_ptr<GpuMemoryBufferImpl>();
|
|
|
|
|