summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjun.a.jiang@intel.com <jun.a.jiang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 20:46:54 +0000
committerjun.a.jiang@intel.com <jun.a.jiang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 20:46:54 +0000
commita4a6bdd1b407ab712a04eacc2feddc1b1df61dfd (patch)
tree19fc073a2bd7279759403e9c2e88a43cca745db6 /webkit
parentdb7ee15d7b5f0c5065b54210d9a42cd8c0fd33a8 (diff)
downloadchromium_src-a4a6bdd1b407ab712a04eacc2feddc1b1df61dfd.zip
chromium_src-a4a6bdd1b407ab712a04eacc2feddc1b1df61dfd.tar.gz
chromium_src-a4a6bdd1b407ab712a04eacc2feddc1b1df61dfd.tar.bz2
Add a new parameter dest_type to the GL_CHROMIUM_copy_texture extension.
It is used to define the destination texture if needed, which is possible for texImage2D(..., canvas) and texImage2D(..., video) in WebGL. BUG= Review URL: https://chromiumcodereview.appspot.com/13613006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc17
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h5
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc8
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.h6
4 files changed, 34 insertions, 2 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index c4ad5ac..ae12422 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -1684,8 +1684,21 @@ 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, WGC3Duint,
- WGC3Duint, WGC3Dint, WGC3Denum)
+DELEGATE_TO_GL_6(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, WGC3Duint,
+ WGC3Duint, WGC3Dint, WGC3Denum, WGC3Denum)
+// This copyTextureCHROMIUM(...) has five parameters and delegates the call to
+// CopyTextureCHROMIUM(...) with the sixth parameter set to GL_UNSIGNED_BYTE
+// to bridge the parameter differences.
+// TODO(jun.a.jiang@intel.com): once all clients switch to call
+// the newer copyTextureCHROMIUM(...) with six parameters, this
+// function will be removed.
+void WebGraphicsContext3DInProcessCommandBufferImpl::copyTextureCHROMIUM(
+ WGC3Denum target, WGC3Duint source_id, WGC3Duint dest_id, WGC3Dint level,
+ WGC3Denum internal_format) {
+ ClearContext();
+ gl_->CopyTextureCHROMIUM(target, source_id, dest_id, level, internal_format,
+ GL_UNSIGNED_BYTE);
+}
void WebGraphicsContext3DInProcessCommandBufferImpl::insertEventMarkerEXT(
const WGC3Dchar* marker) {
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
index 0d5c177..70313e5 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -485,6 +485,11 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl
WGC3Duint dest_id, WGC3Dint level,
WGC3Denum internal_format);
+ virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint source_id,
+ WGC3Duint dest_id, WGC3Dint level,
+ WGC3Denum internal_format,
+ WGC3Denum dest_type);
+
virtual void bindUniformLocationCHROMIUM(WebGLId program, WGC3Dint location,
const WGC3Dchar* uniform);
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index 36ce3d2..f042781 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -1731,11 +1731,19 @@ DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivARB, WGC3Denum, WGC3Denum, WGC3Dint*)
DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivARB,
WebGLId, WGC3Denum, WGC3Duint*)
+// TODO(jun.a.jiang@intel.com): once all clients switch to call
+// the newer copyTextureCHROMIUM(...) with six parameters, this
+// function will be removed.
void WebGraphicsContext3DInProcessImpl::copyTextureCHROMIUM(
WGC3Denum, WGC3Duint, WGC3Duint, WGC3Dint, WGC3Denum) {
NOTIMPLEMENTED();
}
+void WebGraphicsContext3DInProcessImpl::copyTextureCHROMIUM(
+ WGC3Denum, WGC3Duint, WGC3Duint, WGC3Dint, WGC3Denum, WGC3Denum) {
+ NOTIMPLEMENTED();
+}
+
void WebGraphicsContext3DInProcessImpl::bindTexImage2DCHROMIUM(
WGC3Denum target, WGC3Dint imageId) {
NOTIMPLEMENTED();
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index 9e86c64..a96751b 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -477,6 +477,12 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessImpl :
virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint source_id,
WGC3Duint dest_id, WGC3Dint level,
WGC3Denum internal_format);
+
+ virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint source_id,
+ WGC3Duint dest_id, WGC3Dint level,
+ WGC3Denum internal_format,
+ WGC3Denum dest_type);
+
virtual void bindUniformLocationCHROMIUM(WebGLId program, WGC3Dint location,
const WGC3Dchar* uniform);