summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 22:14:11 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 22:14:11 +0000
commit2ab83919c9c98330f453052130176a8320779ed3 (patch)
tree20fd0ff34df907bc400753f00acf36e378094946 /gpu
parenteb40bef833f9ccbfb73075d8fd0791f5f1f094fe (diff)
downloadchromium_src-2ab83919c9c98330f453052130176a8320779ed3.zip
chromium_src-2ab83919c9c98330f453052130176a8320779ed3.tar.gz
chromium_src-2ab83919c9c98330f453052130176a8320779ed3.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= Review URL: https://chromiumcodereview.appspot.com/10411042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141302 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;