Chromium Code Reviews| Index: content/renderer/media/android/stream_texture_factory_impl.cc |
| diff --git a/content/renderer/media/android/stream_texture_factory_impl.cc b/content/renderer/media/android/stream_texture_factory_impl.cc |
| index a17531b2c91a35c97b4907e041e74192126602c3..92ee401e197426ee3e3f9c6abf3e99f4378e03a3 100644 |
| --- a/content/renderer/media/android/stream_texture_factory_impl.cc |
| +++ b/content/renderer/media/android/stream_texture_factory_impl.cc |
| @@ -5,6 +5,7 @@ |
| #include "content/renderer/media/android/stream_texture_factory_impl.h" |
| #include "cc/output/context_provider.h" |
| +#include "content/common/gpu/client/context_provider_command_buffer.h" |
| #include "content/common/gpu/client/gpu_channel_host.h" |
| #include "content/common/gpu/gpu_messages.h" |
| #include "content/renderer/gpu/stream_texture_host_android.h" |
| @@ -110,14 +111,14 @@ void StreamTextureProxyImpl::OnMatrixChanged(const float matrix[16]) { |
| // static |
| scoped_refptr<StreamTextureFactoryImpl> StreamTextureFactoryImpl::Create( |
| - const scoped_refptr<cc::ContextProvider>& context_provider, |
| + const scoped_refptr<ContextProviderCommandBuffer>& context_provider, |
| GpuChannelHost* channel, |
| int frame_id) { |
| return new StreamTextureFactoryImpl(context_provider, channel, frame_id); |
| } |
| StreamTextureFactoryImpl::StreamTextureFactoryImpl( |
| - const scoped_refptr<cc::ContextProvider>& context_provider, |
| + const scoped_refptr<ContextProviderCommandBuffer>& context_provider, |
| GpuChannelHost* channel, |
| int frame_id) |
| : context_provider_(context_provider), |
| @@ -147,9 +148,10 @@ unsigned StreamTextureFactoryImpl::CreateStreamTexture( |
| GLuint stream_id = 0; |
| gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL(); |
| gl->GenTextures(1, texture_id); |
| - |
| - stream_id = gl->CreateStreamTextureCHROMIUM(*texture_id); |
| - |
| + gl->Flush(); |
|
no sievers
2015/10/26 21:35:33
ShallowFlushCHROMIUM() is good enough (and same as
sivag
2015/10/27 15:42:44
Done.
|
| + stream_id = |
| + context_provider_->GetCommandBufferProxy()->CreateStreamTexture( |
| + *texture_id); |
| gl->GenMailboxCHROMIUM(texture_mailbox->name); |
| gl->ProduceTextureDirectCHROMIUM( |
| *texture_id, texture_target, texture_mailbox->name); |