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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10960039: Adding the implementation of the StreamTextureFactoryImpl for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using shared context from webkit Created 8 years, 3 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 181b273f6f4075fdd0ab19f3cceb9564ad91c74e..66ceab2aacbd89449f1a5fa514884ac73a1c4909 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2498,8 +2498,17 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer(
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
#if defined(OS_ANDROID)
- // TODO(qinmin): upstream the implementation of getting WebGraphicsContext3D
- // and GpuChannelHost here to replace the NULL params.
+ WebGraphicsContext3D* resource_context =
+ GetWebView()->sharedGraphicsContext3D();
+
+ GpuChannelHost* gpu_channel_host =
+ RenderThreadImpl::current()->EstablishGpuChannelSync(
+ content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
+ if (!gpu_channel_host) {
+ LOG(ERROR) << "Failed to establish GPU channel for media player";
+ return NULL;
+ }
+
if (cmd_line->HasSwitch(switches::kMediaPlayerInRenderProcess)) {
if (!media_bridge_manager_.get()) {
media_bridge_manager_.reset(
@@ -2512,7 +2521,7 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer(
media_player_manager_.get(),
media_bridge_manager_.get(),
new content::StreamTextureFactoryImpl(
- NULL, NULL, routing_id_),
+ resource_context, gpu_channel_host, routing_id_),
cmd_line->HasSwitch(switches::kDisableMediaHistoryLogging));
}
if (!media_player_proxy_) {
@@ -2525,7 +2534,7 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer(
media_player_manager_.get(),
media_player_proxy_,
new content::StreamTextureFactoryImpl(
- NULL, NULL, routing_id_));
+ resource_context, gpu_channel_host, routing_id_));
#endif
media::MessageLoopFactory* message_loop_factory =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698