Index: content/renderer/media/android/stream_texture_factory.cc |
diff --git a/content/renderer/media/android/stream_texture_factory.cc b/content/renderer/media/android/stream_texture_factory.cc |
index 2408fa1910bf94b8334850a9744e9a13b13b7994..8b4f38a3528b36cd4a8b25c5e809d6b09d25129a 100644 |
--- a/content/renderer/media/android/stream_texture_factory.cc |
+++ b/content/renderer/media/android/stream_texture_factory.cc |
@@ -104,13 +104,17 @@ unsigned StreamTextureFactory::CreateStreamTexture( |
gpu::Mailbox* texture_mailbox) { |
GLuint stream_id = 0; |
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL(); |
+ int32_t image_id = channel_->ReserveImageId(); |
gl->GenTextures(1, texture_id); |
gl->ShallowFlushCHROMIUM(); |
stream_id = context_provider_->GetCommandBufferProxy()->CreateStreamTexture( |
- *texture_id); |
+ image_id); |
+ gl->BindTexture(texture_target, *texture_id); |
+ gl->BindTexImage2DCHROMIUM(texture_target, image_id); |
gl->GenMailboxCHROMIUM(texture_mailbox->name); |
gl->ProduceTextureDirectCHROMIUM( |
*texture_id, texture_target, texture_mailbox->name); |
+ gl->Finish(); |
return stream_id; |
} |