summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 19:57:16 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 19:57:16 +0000
commit69023944fd69b3cabe71f1dec7fdfa922f2034d7 (patch)
tree44f8d73a06d55e9136af99e1c79e4a59274e7c7a /content/common
parentb949fcb52666d423b7c66d9a7a69d482bf056513 (diff)
downloadchromium_src-69023944fd69b3cabe71f1dec7fdfa922f2034d7.zip
chromium_src-69023944fd69b3cabe71f1dec7fdfa922f2034d7.tar.gz
chromium_src-69023944fd69b3cabe71f1dec7fdfa922f2034d7.tar.bz2
gpu: Add async upload functions.
Just adding the API first to unblock other CLs and so we can start to use the API. Async tasks are just done synchronously, and the completion query is set immediately when it executes in the GPU process. BUG=161337 Review URL: https://chromiumcodereview.appspot.com/11412232 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc30
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h22
2 files changed, 52 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 5a6dff1..0c2bdba 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -1644,6 +1644,36 @@ WGC3Dboolean WebGraphicsContext3DCommandBufferImpl::unmapBufferCHROMIUM(
return gl_->UnmapBufferCHROMIUM(target);
}
+void WebGraphicsContext3DCommandBufferImpl::asyncTexImage2DCHROMIUM(
+ WGC3Denum target,
+ WGC3Dint level,
+ WGC3Denum internalformat,
+ WGC3Dsizei width,
+ WGC3Dsizei height,
+ WGC3Dint border,
+ WGC3Denum format,
+ WGC3Denum type,
+ const void* pixels) {
+ return gl_->AsyncTexImage2DCHROMIUM(
+ target, level, internalformat,
+ width, height, border, format, type, pixels);
+}
+
+void WebGraphicsContext3DCommandBufferImpl::asyncTexSubImage2DCHROMIUM(
+ WGC3Denum target,
+ WGC3Dint level,
+ WGC3Dint xoffset,
+ WGC3Dint yoffset,
+ WGC3Dsizei width,
+ WGC3Dsizei height,
+ WGC3Denum format,
+ WGC3Denum type,
+ const void *pixels) {
+ return gl_->AsyncTexSubImage2DCHROMIUM(
+ target, level, xoffset, yoffset,
+ width, height, format, type, pixels);
+}
+
GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
return webkit::gpu::CreateCommandBufferSkiaGLBinding();
}
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
index 1fc3206..81dd6b5 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
@@ -606,6 +606,28 @@ class WebGraphicsContext3DCommandBufferImpl
virtual void* mapBufferCHROMIUM(WGC3Denum target, WGC3Denum access);
virtual WGC3Dboolean unmapBufferCHROMIUM(WGC3Denum target);
+ // Async pixel transfer functions.
+ virtual void asyncTexImage2DCHROMIUM(
+ WGC3Denum target,
+ WGC3Dint level,
+ WGC3Denum internalformat,
+ WGC3Dsizei width,
+ WGC3Dsizei height,
+ WGC3Dint border,
+ WGC3Denum format,
+ WGC3Denum type,
+ const void* pixels);
+ virtual void asyncTexSubImage2DCHROMIUM(
+ WGC3Denum target,
+ WGC3Dint level,
+ WGC3Dint xoffset,
+ WGC3Dint yoffset,
+ WGC3Dsizei width,
+ WGC3Dsizei height,
+ WGC3Denum format,
+ WGC3Denum type,
+ const void* pixels);
+
protected:
virtual GrGLInterface* onCreateGrGLInterface();