From 0a1e9ad53f2f7f2fc6139644da122e272b88fb80 Mon Sep 17 00:00:00 2001 From: "twiz@chromium.org" Date: Fri, 4 May 2012 21:13:03 +0000 Subject: Addition of a set of basic unit tests for the GL_CHROMIUM_copy_texture extension. This change also introduces a new parameter to the extension, internal_format. This is to bring the extension closer in functionality to glCopyTexImage. The tests uncovered state that was not being properly restored: GL_BLEND. This is also corrected. TEST=GLCopyTextureCHROMIUMTest.* BUG=126178 Review URL: http://codereview.chromium.org/10356004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135434 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 4 +++- content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 5868cb9..b575103 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -1480,6 +1480,9 @@ DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, WebGLId, WGC3Denum, WGC3Duint*) +DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, + WGC3Denum, WGC3Denum, WGC3Dint, WGC3Dint); + #if WEBKIT_USING_SKIA GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { return webkit_glue::CreateCommandBufferSkiaGLBinding(); @@ -1523,4 +1526,3 @@ void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( error_message_callback_->onErrorMessage(str, id); } } - diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h index 03472a5..7e4335a 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h @@ -555,6 +555,10 @@ class WebGraphicsContext3DCommandBufferImpl virtual void getQueryObjectuivEXT( WebGLId query, WGC3Denum pname, WGC3Duint* params); + virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Denum source_id, + WGC3Denum dest_id, WGC3Dint level, + WGC3Dint internal_format); + protected: #if WEBKIT_USING_SKIA virtual GrGLInterface* onCreateGrGLInterface(); -- cgit v1.1