Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1586)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1385883002: Leave CreateStreamTexture route id out of the GL interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 804e01826cc2863ebdfecf3db6584eb427c1dce7..a5c87222b31d4ded15cf8374442c027ebf3ec2c0 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -164,6 +164,7 @@
#include "content/renderer/android/synchronous_compositor_factory.h"
#include "content/renderer/android/synchronous_compositor_filter.h"
#include "content/renderer/media/android/renderer_demuxer_android.h"
+#include "content/renderer/media/android/stream_texture_factory_impl.h"
#endif
#if defined(OS_MACOSX)
@@ -869,6 +870,7 @@ void RenderThreadImpl::Shutdown() {
RemoveFilter(sync_compositor_message_filter_.get());
sync_compositor_message_filter_ = nullptr;
}
+ stream_texture_factory_ = nullptr;
#endif
media_thread_.reset();
@@ -1464,6 +1466,28 @@ RenderThreadImpl::SharedMainThreadContextProvider() {
return shared_main_thread_contexts_;
}
+#if defined(OS_ANDROID)
+scoped_refptr<StreamTextureFactory> RenderThreadImpl::GetStreamTexureFactory() {
+ DCHECK(IsMainThread());
+ if (!SharedMainThreadContextProvider().get()) {
+ stream_texture_factory_ = NULL;
+ return NULL;
+ }
+ // Create shared StreamTextureFactoryImpl per RenderThreadImpl when we
+ // create ContextProviderCommandBuffer.
+ scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync(
+ CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE));
+ if (!gpu_channel_host.get()) {
+ LOG(ERROR) << "Failed to establish GPU channel for media player";
+ stream_texture_factory_ = NULL;
+ } else {
+ stream_texture_factory_ = StreamTextureFactoryImpl::Create(
no sievers 2015/11/09 21:27:34 If you are creating a new factory every time, then
sivag 2015/11/10 13:18:56 Done.
+ shared_main_thread_contexts_, gpu_channel_host.get());
+ }
+ return stream_texture_factory_;
+}
+#endif
+
AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() {
if (!audio_renderer_mixer_manager_) {
audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager());
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698