| Index: content/renderer/media/android/stream_texture_factory_android.cc
|
| diff --git a/content/renderer/media/android/stream_texture_factory_android.cc b/content/renderer/media/android/stream_texture_factory_android.cc
|
| index de739786df5f42e08da379c713162e7b0f5e1515..67f33f069134313b6184ad9082769117a22e72d0 100644
|
| --- a/content/renderer/media/android/stream_texture_factory_android.cc
|
| +++ b/content/renderer/media/android/stream_texture_factory_android.cc
|
| @@ -73,18 +73,30 @@ void StreamTextureFactory::EstablishPeer(int stream_id, int player_id) {
|
| new GpuChannelMsg_EstablishStreamTexture(stream_id, view_id_, player_id));
|
| }
|
|
|
| -unsigned StreamTextureFactory::CreateStreamTexture(unsigned* texture_id) {
|
| +unsigned StreamTextureFactory::CreateStreamTexture(
|
| + unsigned texture_target,
|
| + unsigned* texture_id,
|
| + gpu::Mailbox* texture_mailbox,
|
| + unsigned* texture_mailbox_sync_point) {
|
| unsigned stream_id = 0;
|
| if (context_->makeContextCurrent()) {
|
| *texture_id = context_->createTexture();
|
| stream_id = context_->createStreamTextureCHROMIUM(*texture_id);
|
| +
|
| + context_->genMailboxCHROMIUM(texture_mailbox->name);
|
| + context_->bindTexture(texture_target, *texture_id);
|
| + context_->produceTextureCHROMIUM(texture_target, texture_mailbox->name);
|
| +
|
| context_->flush();
|
| + *texture_mailbox_sync_point = context_->insertSyncPoint();
|
| }
|
| return stream_id;
|
| }
|
|
|
| void StreamTextureFactory::DestroyStreamTexture(unsigned texture_id) {
|
| if (context_->makeContextCurrent()) {
|
| + // TODO(sievers): Make the destroyStreamTexture implicit when the last
|
| + // texture referencing it is lost.
|
| context_->destroyStreamTextureCHROMIUM(texture_id);
|
| context_->deleteTexture(texture_id);
|
| context_->flush();
|
|
|