Chromium Code Reviews| 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 355519f2738aa2ef641c5d4b99f11641c169294e..b444742f78fa89dbafc55cc2b5a69997223ccc69 100644 |
| --- a/content/renderer/media/stream_texture_factory_impl_android.cc |
| +++ b/content/renderer/media/stream_texture_factory_impl_android.cc |
| @@ -116,19 +116,37 @@ 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(); |
| + context_->genMailboxCHROMIUM(texture_mailbox->name); |
| + context_->bindTexture(texture_target, *texture_id); |
| + context_->produceTextureCHROMIUM(texture_target, texture_mailbox->name); |
| + *texture_mailbox_sync_point = context_->insertSyncPoint(); |
|
no sievers
2013/04/18 17:37:08
You'll have to move this after createStreamTexture
danakj
2013/04/19 18:03:52
Ok done, but I still am getting black output for t
no sievers
2013/04/19 18:12:07
Not sure where the flush in the code comes from, c
|
| + |
| stream_id = context_->createStreamTextureCHROMIUM(*texture_id); |
| context_->flush(); |
| } |
| return stream_id; |
| } |
| -void StreamTextureFactoryImpl::DestroyStreamTexture(unsigned texture_id) { |
| +void StreamTextureFactoryImpl::DestroyStreamTexture( |
| + unsigned texture_target, |
| + unsigned texture_id, |
| + const gpu::Mailbox& texture_mailbox, |
| + unsigned texture_mailbox_sync_point) { |
| if (context_->makeContextCurrent()) { |
| context_->destroyStreamTextureCHROMIUM(texture_id); |
| + |
| + if (texture_mailbox_sync_point) |
| + context_->waitSyncPoint(texture_mailbox_sync_point); |
| + context_->bindTexture(texture_target, texture_id); |
| + context_->consumeTextureCHROMIUM(texture_target, texture_mailbox.name); |
| context_->deleteTexture(texture_id); |
| context_->flush(); |
| } |