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/webgraphicscontext3d_command_buffer_impl.cc | |
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/webgraphicscontext3d_command_buffer_impl.cc')
-rw-r--r-- | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index bd4ebab..ccbde6f 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -147,6 +147,11 @@ void WebGraphicsContext3DCommandBufferImpl::name(t1 a1, t2 a2, t3 a3) { \ gl_->glname(a1, a2, a3); \ } +#define DELEGATE_TO_GL_3R(name, glname, t1, t2, t3, rt) \ +rt WebGraphicsContext3DCommandBufferImpl::name(t1 a1, t2 a2, t3 a3) { \ + return gl_->glname(a1, a2, a3); \ +} + #define DELEGATE_TO_GL_4(name, glname, t1, t2, t3, t4) \ void WebGraphicsContext3DCommandBufferImpl::name(t1 a1, t2 a2, t3 a3, \ t4 a4) { \ @@ -1525,6 +1530,20 @@ void WebGraphicsContext3DCommandBufferImpl::drawElementsInstancedANGLE( DELEGATE_TO_GL_2(vertexAttribDivisorANGLE, VertexAttribDivisorANGLE, WGC3Duint, WGC3Duint) +DELEGATE_TO_GL_3R(createImageCHROMIUM, CreateImageCHROMIUM, + WGC3Dsizei, WGC3Dsizei, WGC3Denum, + WGC3Duint); + +DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint); + +DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM, + WGC3Duint, WGC3Denum, GLint*); + +DELEGATE_TO_GL_2R(mapImageCHROMIUM, MapImageCHROMIUM, + WGC3Duint, WGC3Denum, void*); + +DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint); + GrGLInterface* WebGraphicsContext3DCommandBufferImpl::createGrGLInterface() { return webkit::gpu::CreateCommandBufferSkiaGLBinding(); } |