| Index: content/common/gpu/media/rendering_helper.cc
|
| diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
|
| index 6abe8c5ca4dda93ac3032d70dee4deae488a1872..816ffb4a1d93286acbc3ca830e1363b75bc9164a 100644
|
| --- a/content/common/gpu/media/rendering_helper.cc
|
| +++ b/content/common/gpu/media/rendering_helper.cc
|
| @@ -470,21 +470,16 @@ void RenderingHelper::RenderThumbnail(uint32 texture_target,
|
| }
|
|
|
| void RenderingHelper::RenderTexture(uint32 texture_target, uint32 texture_id) {
|
| - // Unbound texture samplers default to (0, 0, 0, 1). Use this fact to switch
|
| - // between GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES as appopriate.
|
| + // The ExternalOES sampler is bound to GL_TEXTURE1 and the Texture2D sampler
|
| + // is bound to GL_TEXTURE0.
|
| if (texture_target == GL_TEXTURE_2D) {
|
| glActiveTexture(GL_TEXTURE0 + 0);
|
| - glBindTexture(GL_TEXTURE_2D, texture_id);
|
| - glActiveTexture(GL_TEXTURE0 + 1);
|
| - glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
|
| } else if (texture_target == GL_TEXTURE_EXTERNAL_OES) {
|
| - glActiveTexture(GL_TEXTURE0 + 0);
|
| - glBindTexture(GL_TEXTURE_2D, 0);
|
| glActiveTexture(GL_TEXTURE0 + 1);
|
| - glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_id);
|
| }
|
| -
|
| + glBindTexture(texture_target, texture_id);
|
| glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
| + glBindTexture(texture_target, 0);
|
| CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
|
| }
|
|
|
|
|