diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-22 23:13:09 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-22 23:13:09 +0000 |
commit | bc10f46abc6b4d6338fd1819b0360bc9115846f2 (patch) | |
tree | 34595adeaffa513af37b0caa4e9afd05cfcf65d0 /content/common/gpu/client/command_buffer_proxy_impl.h | |
parent | 9f67dd0edac097ff862e9f92e988da2f5cb19348 (diff) | |
download | chromium_src-bc10f46abc6b4d6338fd1819b0360bc9115846f2.zip chromium_src-bc10f46abc6b4d6338fd1819b0360bc9115846f2.tar.gz chromium_src-bc10f46abc6b4d6338fd1819b0360bc9115846f2.tar.bz2 |
Add multi-process GpuMemoryBuffer framework.
This adds a multi-process framework for reading/writing directly to
memory that the 3D graphics hardware can use for rendering without
any costly copying having to be done on the GPU process side.
A GpuMemoryBuffer is a type of shared memory that can be accessed
by the GPU. The high level procedure required to allocate this type
of memory is almost exactly the same as that for standard shared
memory. Only the browser process can allocated the memory and it
needs to be shared and registered with the GPU process before it can
be used.
This also adds a GpuMemoryBuffer type that is backed by standard
shared memory for testing purposes.
TEST=gpu_unittests --gtest_filter=MockGpuMemoryBufferTest.Lifecycle
BUG=261649
Review URL: https://codereview.chromium.org/19762004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/client/command_buffer_proxy_impl.h')
-rw-r--r-- | content/common/gpu/client/command_buffer_proxy_impl.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h index c891483..35255a9 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.h +++ b/content/common/gpu/client/command_buffer_proxy_impl.h @@ -16,7 +16,6 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "content/common/gpu/gpu_memory_allocation.h" -#include "content/common/gpu/gpu_memory_allocation.h" #include "gpu/command_buffer/common/command_buffer.h" #include "gpu/command_buffer/common/command_buffer_shared.h" #include "gpu/command_buffer/common/gpu_control.h" @@ -30,6 +29,10 @@ namespace base { class SharedMemory; } +namespace gfx { +class GpuMemoryBuffer; +} + namespace gpu { struct Mailbox; } @@ -145,6 +148,7 @@ class CommandBufferProxyImpl private: typedef std::map<int32, gpu::Buffer> TransferBufferMap; typedef base::hash_map<uint32, base::Closure> SignalTaskMap; + typedef std::map<int32, gfx::GpuMemoryBuffer*> GpuMemoryBufferMap; // Send an IPC message over the GPU channel. This is private to fully // encapsulate the channel; all callers of this function must explicitly @@ -202,6 +206,9 @@ class CommandBufferProxyImpl uint32 next_signal_id_; SignalTaskMap signal_tasks_; + // Local cache of id to gpu memory buffer mapping. + GpuMemoryBufferMap gpu_memory_buffers_; + DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); }; |