| Index: content/common/gpu/client/gpu_channel_host.cc
|
| ===================================================================
|
| --- content/common/gpu/client/gpu_channel_host.cc (revision 277402)
|
| +++ content/common/gpu/client/gpu_channel_host.cc (working copy)
|
| @@ -53,6 +53,9 @@
|
| #if defined(OS_ANDROID)
|
| case gfx::SURFACE_TEXTURE_BUFFER:
|
| #endif
|
| +#if defined(OS_LINUX)
|
| + case gfx::DMA_BUFFER:
|
| +#endif
|
| return true;
|
| default:
|
| return false;
|
| @@ -276,6 +279,7 @@
|
| return target_handle;
|
| #else
|
| int duped_handle = HANDLE_EINTR(dup(source_handle.fd));
|
| + //int duped_handle = source_handle.fd;
|
| if (duped_handle < 0)
|
| return base::SharedMemory::NULLHandle();
|
|
|
| @@ -290,10 +294,16 @@
|
| gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess(
|
| gfx::GpuMemoryBufferHandle source_handle) {
|
| switch (source_handle.type) {
|
| +#if defined(OS_LINUX)
|
| + case gfx::DMA_BUFFER:
|
| +#endif
|
| case gfx::SHARED_MEMORY_BUFFER: {
|
| gfx::GpuMemoryBufferHandle handle;
|
| - handle.type = gfx::SHARED_MEMORY_BUFFER;
|
| + handle.type = source_handle.type;
|
| handle.handle = ShareToGpuProcess(source_handle.handle);
|
| + //fprintf(stderr, "(%d -> %d)\n", source_handle.handle.fd, handle.handle.fd);
|
| + handle.card_handle = ShareToGpuProcess(source_handle.card_handle);
|
| + handle.stride = source_handle.stride;
|
| return handle;
|
| }
|
| #if defined(OS_MACOSX)
|
|
|