summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 21:18:08 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 21:18:08 +0000
commit747271185984570d70a56a77ec52e37954e5258c (patch)
tree8d6d030b4bf4833d6c8e16a10ed806461217ef37 /gpu
parent984af6565ab6dc58b258964d562503810c4e536b (diff)
downloadchromium_src-747271185984570d70a56a77ec52e37954e5258c.zip
chromium_src-747271185984570d70a56a77ec52e37954e5258c.tar.gz
chromium_src-747271185984570d70a56a77ec52e37954e5258c.tar.bz2
hook up new MacVideoDecodeAccelerator
This CL hooks up the new MacVideoDecodeAccelerator so that it can be instantiated by the HTML5 and pepper code. Currently only the pepper code uses it. I also updated the pepper video_decode example app to be able to draw the GL_TEXTURE_RECTANGLE_ARB textures that the Mac decoder generates. BUG=127414 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141302 Review URL: https://chromiumcodereview.appspot.com/10411042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc4
-rw-r--r--gpu/command_buffer/service/program_manager.h4
3 files changed, 6 insertions, 4 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 9c10bb4..ea0bd73 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -497,6 +497,8 @@ uint32 GLES2Util::GetGLDataTypeSizeForUniforms(int type) {
return sizeof(GLfloat) * 4 * 4; // NOLINT
case GL_SAMPLER_2D:
return sizeof(GLint); // NOLINT
+ case GL_SAMPLER_2D_RECT_ARB:
+ return sizeof(GLint); // NOLINT
case GL_SAMPLER_CUBE:
return sizeof(GLint); // NOLINT
case GL_SAMPLER_EXTERNAL_OES:
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 31f6a8b..e53f1ee1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4695,8 +4695,8 @@ void GLES2DecoderImpl::DoUniform1iv(
fake_location, "glUniform1iv", &real_location, &type, &count)) {
return;
}
- if (type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE ||
- type == GL_SAMPLER_EXTERNAL_OES) {
+ if (type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB ||
+ type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES) {
if (!current_program_->SetSamplers(
group_->max_texture_units(), fake_location, count, value)) {
SetGLError(GL_INVALID_VALUE, "glUniform1iv", "texture unit out of range");
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
index 650385c..553c313 100644
--- a/gpu/command_buffer/service/program_manager.h
+++ b/gpu/command_buffer/service/program_manager.h
@@ -42,8 +42,8 @@ class GPU_EXPORT ProgramManager {
~UniformInfo();
bool IsSampler() const {
- return type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE ||
- type == GL_SAMPLER_EXTERNAL_OES;
+ return type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB ||
+ type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES;
}
GLsizei size;