summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 07:30:30 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 07:30:30 +0000
commite0d6b1f946e5eba6abc2b2264d1fb64451b66b83 (patch)
treeb39a86f4a61aa95d1c119e71e110cf660bde9761 /webkit/gpu
parentf57bbc063aa387dbd7c929cacc8d55a960a28ec4 (diff)
downloadchromium_src-e0d6b1f946e5eba6abc2b2264d1fb64451b66b83.zip
chromium_src-e0d6b1f946e5eba6abc2b2264d1fb64451b66b83.tar.gz
chromium_src-e0d6b1f946e5eba6abc2b2264d1fb64451b66b83.tar.bz2
Add support for GL_CHROMIUM_pixel_transfer_buffer_object.
This adds two new types of buffer objects, GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM and GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM. The PIXEL_PACK buffer affects API calls that pack pixel data, such as glReadPixels. The PIXEL_UNPACK buffer affects API calls that unpack pixel data, such as glTexImage2D. These new buffer object are backed by shared memory, which allows clients to update them without any unnecessary copying. BUG=111096,161337 TEST=unit tests Review URL: https://chromiumcodereview.appspot.com/10440019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc12
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h3
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc10
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.h3
4 files changed, 28 insertions, 0 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index 46403d7..e738004 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -1643,6 +1643,18 @@ DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM,
DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM,
WGC3Denum, WGC3Dint)
+void* WebGraphicsContext3DInProcessCommandBufferImpl::mapBufferCHROMIUM(
+ WGC3Denum target, WGC3Denum access) {
+ ClearContext();
+ return gl_->MapBufferCHROMIUM(target, access);
+}
+
+WGC3Dboolean WebGraphicsContext3DInProcessCommandBufferImpl::
+ unmapBufferCHROMIUM(WGC3Denum target) {
+ ClearContext();
+ return gl_->UnmapBufferCHROMIUM(target);
+}
+
GrGLInterface* WebGraphicsContext3DInProcessCommandBufferImpl::
onCreateGrGLInterface() {
return webkit_glue::CreateCommandBufferSkiaGLBinding();
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
index d4b0b3a..ec9a8c0 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -497,6 +497,9 @@ class WebGraphicsContext3DInProcessCommandBufferImpl
virtual void pushGroupMarkerEXT(const WGC3Dchar* marker);
virtual void popGroupMarkerEXT();
+ virtual void* mapBufferCHROMIUM(WGC3Denum target, WGC3Denum access);
+ virtual WGC3Dboolean unmapBufferCHROMIUM(WGC3Denum target);
+
protected:
virtual GrGLInterface* onCreateGrGLInterface();
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index 27daf11..663fcbf 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -1714,6 +1714,16 @@ void WebGraphicsContext3DInProcessImpl::releaseTexImage2DCHROMIUM(
NOTIMPLEMENTED();
}
+void* WebGraphicsContext3DInProcessImpl::mapBufferCHROMIUM(
+ WGC3Denum target, WGC3Denum access) {
+ return 0;
+}
+
+WGC3Dboolean WebGraphicsContext3DInProcessImpl::unmapBufferCHROMIUM(
+ WGC3Denum target) {
+ return false;
+}
+
GrGLInterface* WebGraphicsContext3DInProcessImpl::onCreateGrGLInterface() {
return gfx::CreateInProcessSkiaGLBinding();
}
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index fa1f82a..582e873 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -492,6 +492,9 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
virtual void bindTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId);
virtual void releaseTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId);
+ virtual void* mapBufferCHROMIUM(WGC3Denum target, WGC3Denum access);
+ virtual WGC3Dboolean unmapBufferCHROMIUM(WGC3Denum target);
+
protected:
virtual GrGLInterface* onCreateGrGLInterface();