summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2014-10-13 13:52:05 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-13 20:52:24 +0000
commit22dd9298e4365cfbc3662e98c3b387fe7f3ce6a3 (patch)
treedd30022f67c3a45551c67b2d5a1664364b3bf0c9 /webkit
parent6e402f141ae341c5df18ca81e892089c47fae54f (diff)
downloadchromium_src-22dd9298e4365cfbc3662e98c3b387fe7f3ce6a3.zip
chromium_src-22dd9298e4365cfbc3662e98c3b387fe7f3ce6a3.tar.gz
chromium_src-22dd9298e4365cfbc3662e98c3b387fe7f3ce6a3.tar.bz2
gpu: Compositor management of GpuMemoryBuffer instances.
This is a refactor of the CHROMIUM_image extension that allows the compositor to map/unmap GpuMemoryBuffers on worker threads and potentially also allocate these buffers on worker threads. CreateImageCHROMIUM now takes an opaque ClientBuffer as first parameter. ClientBuffer is implementation specific and in the case of chromium a gfx::GpuMemoryBuffer. Or more specifically a content::GpuMemoryBufferImpl when used with the content layer. This allows the compositor to allocate and use GpuMemoryBuffers without a GLES2Interface. A GpuMemoryBufferManager interface has been introduced. This interface provides a mechanism for the compositor to allocate GpuMemoryBuffer instances in the renderer and browser process. BUG=418553 Review URL: https://codereview.chromium.org/634083002 Cr-Commit-Position: refs/heads/master@{#299360}
Diffstat (limited to 'webkit')
-rw-r--r--webkit/common/gpu/webgraphicscontext3d_impl.cc19
-rw-r--r--webkit/common/gpu/webgraphicscontext3d_impl.h12
2 files changed, 3 insertions, 28 deletions
diff --git a/webkit/common/gpu/webgraphicscontext3d_impl.cc b/webkit/common/gpu/webgraphicscontext3d_impl.cc
index 9f0a351a..3625de5 100644
--- a/webkit/common/gpu/webgraphicscontext3d_impl.cc
+++ b/webkit/common/gpu/webgraphicscontext3d_impl.cc
@@ -911,23 +911,6 @@ void WebGraphicsContext3DImpl::drawElementsInstancedANGLE(
DELEGATE_TO_GL_2(vertexAttribDivisorANGLE, VertexAttribDivisorANGLE, WGC3Duint,
WGC3Duint)
-DELEGATE_TO_GL_4R(createImageCHROMIUM,
- CreateImageCHROMIUM,
- WGC3Dsizei,
- WGC3Dsizei,
- WGC3Denum,
- WGC3Denum,
- WGC3Duint);
-
-DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint);
-
-DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM,
- WGC3Duint, WGC3Denum, GLint*);
-
-DELEGATE_TO_GL_1R(mapImageCHROMIUM, MapImageCHROMIUM, WGC3Duint, void*);
-
-DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint);
-
DELEGATE_TO_GL_4R(createGpuMemoryBufferImageCHROMIUM,
CreateGpuMemoryBufferImageCHROMIUM,
WGC3Dsizei,
@@ -936,6 +919,8 @@ DELEGATE_TO_GL_4R(createGpuMemoryBufferImageCHROMIUM,
WGC3Denum,
WGC3Duint);
+DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint);
+
DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT,
FramebufferTexture2DMultisampleEXT,
WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei)
diff --git a/webkit/common/gpu/webgraphicscontext3d_impl.h b/webkit/common/gpu/webgraphicscontext3d_impl.h
index 826bac3..ee3cb36 100644
--- a/webkit/common/gpu/webgraphicscontext3d_impl.h
+++ b/webkit/common/gpu/webgraphicscontext3d_impl.h
@@ -534,22 +534,12 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DImpl
WGC3Denum type, WGC3Dintptr offset, WGC3Dsizei primcount);
virtual void vertexAttribDivisorANGLE(WGC3Duint index, WGC3Duint divisor);
- // GL_CHROMIUM_image
- virtual WGC3Duint createImageCHROMIUM(WGC3Dsizei width,
- WGC3Dsizei height,
- WGC3Denum internalformat,
- WGC3Denum usage);
- virtual void destroyImageCHROMIUM(WGC3Duint image_id);
- virtual void getImageParameterivCHROMIUM(
- WGC3Duint image_id, WGC3Denum pname, WGC3Dint* params);
- virtual void* mapImageCHROMIUM(WGC3Duint image_id);
- virtual void unmapImageCHROMIUM(WGC3Duint image_id);
-
// GL_CHROMIUM_gpu_memory_buffer_image
virtual WGC3Duint createGpuMemoryBufferImageCHROMIUM(WGC3Dsizei width,
WGC3Dsizei height,
WGC3Denum internalformat,
WGC3Denum usage);
+ virtual void destroyImageCHROMIUM(WGC3Duint image_id);
// GL_EXT_multisampled_render_to_texture
virtual void framebufferTexture2DMultisampleEXT(WGC3Denum target,