| Index: content/renderer/media/stream_texture_factory_impl_android.cc
|
| diff --git a/content/renderer/media/stream_texture_factory_impl_android.cc b/content/renderer/media/stream_texture_factory_impl_android.cc
|
| index b33c9246628f5f071fc8a06a2a36acce8b6c7220..f706fec4c6deced0bb2196a71000202c75e337dd 100644
|
| --- a/content/renderer/media/stream_texture_factory_impl_android.cc
|
| +++ b/content/renderer/media/stream_texture_factory_impl_android.cc
|
| @@ -116,18 +116,30 @@ void StreamTextureFactoryImpl::EstablishPeer(int stream_id, int player_id) {
|
| stream_id, view_id_, player_id));
|
| }
|
|
|
| -unsigned StreamTextureFactoryImpl::CreateStreamTexture(unsigned* texture_id) {
|
| +unsigned StreamTextureFactoryImpl::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 StreamTextureFactoryImpl::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();
|
|
|