Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Unified Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 288343004: working copy of "zero_copy" Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_dma_buf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_dma_buf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698