Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: content/renderer/media/renderer_gpu_video_decoder_factories.cc

Issue 10703184: Mac HW Video Decode: Fix texture creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/renderer_gpu_video_decoder_factories.cc
diff --git a/content/renderer/media/renderer_gpu_video_decoder_factories.cc b/content/renderer/media/renderer_gpu_video_decoder_factories.cc
index adf8a44c2e3c3045907046bc14045e665a3fce3b..d23024cbe5348a5136b91775da188270aadd2d2a 100644
--- a/content/renderer/media/renderer_gpu_video_decoder_factories.cc
+++ b/content/renderer/media/renderer_gpu_video_decoder_factories.cc
@@ -4,6 +4,9 @@
#include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+
#include "base/bind.h"
#include "base/synchronization/waitable_event.h"
#include "content/common/child_thread.h"
@@ -109,8 +112,10 @@ void RendererGpuVideoDecoderFactories::AsyncCreateTextures(
gles2->TexParameteri(texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
gles2->TexParameterf(texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
gles2->TexParameterf(texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- gles2->TexImage2D(texture_target, 0, GL_RGBA, size.width(), size.height(),
- 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ if (texture_target == GL_TEXTURE_2D) {
+ gles2->TexImage2D(texture_target, 0, GL_RGBA, size.width(), size.height(),
+ 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ }
}
// We need a glFlush here to guarantee the decoder (in the GPU process) can
// use the texture ids we return here. Since textures are expected to be
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698