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

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: Rebasing TOT! 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 28fde258969dd58fd8de1aa5dceba9a3a96c8fc9..9dd0a4de1708300bb6967f85409c1a634cb9bd16 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -163,6 +163,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)
@@ -868,6 +869,7 @@ void RenderThreadImpl::Shutdown() {
RemoveFilter(sync_compositor_message_filter_.get());
sync_compositor_message_filter_ = nullptr;
}
+ stream_texture_factory_ = nullptr;
#endif
media_thread_.reset();
@@ -1468,6 +1470,30 @@ RenderThreadImpl::SharedMainThreadContextProvider() {
return shared_main_thread_contexts_;
}
+#if defined(OS_ANDROID)
+scoped_refptr<StreamTextureFactory> RenderThreadImpl::GetStreamTexureFactory() {
+ DCHECK(IsMainThread());
+ if (!stream_texture_factory_.get() ||
+ stream_texture_factory_->ContextGL()->GetGraphicsResetStatusKHR() !=
+ GL_NO_ERROR) {
+ if (!SharedMainThreadContextProvider().get()) {
+ stream_texture_factory_ = NULL;
+ return NULL;
+ }
+ 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(
+ 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