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

Unified Diff: content/renderer/render_view_impl.cc

Issue 9639005: HW video decode support for --enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR response. Created 8 years, 9 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 | « content/renderer/media/renderer_gpu_video_decoder_factories.cc ('k') | media/filters/gpu_video_decoder.h » ('j') | 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 3e59c4a9b643091fd8e35480b4daf5dfc1b9df4f..1c5931187f9493aa9d748b27199556fa1abd37dc 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -55,6 +55,7 @@
#include "content/renderer/dom_automation_controller.h"
#include "content/renderer/external_popup_menu.h"
#include "content/renderer/geolocation_dispatcher.h"
+#include "content/renderer/gpu/compositor_thread.h"
#include "content/renderer/idle_user_detector.h"
#include "content/renderer/input_tag_speech_dispatcher.h"
#include "content/renderer/web_intents_host.h"
@@ -2142,14 +2143,20 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer(
WebGraphicsContext3DCommandBufferImpl* context3d =
static_cast<WebGraphicsContext3DCommandBufferImpl*>(
webview()->graphicsContext3D());
- if (context3d && context3d->makeContextCurrent()) {
+ if (context3d) {
+ MessageLoop* factories_loop =
+ RenderThreadImpl::current()->compositor_thread() ?
+ RenderThreadImpl::current()->compositor_thread()->GetWebThread()
jamesr 2012/03/09 05:02:17 should we just have a message_loop() getter on com
+ ->message_loop() :
+ MessageLoop::current();
GpuChannelHost* gpu_channel_host =
RenderThreadImpl::current()->EstablishGpuChannelSync(
content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
collection->AddVideoDecoder(new media::GpuVideoDecoder(
message_loop_factory->GetMessageLoop("GpuVideoDecoder"),
+ factories_loop,
new RendererGpuVideoDecoderFactories(
- gpu_channel_host, context3d->context()->AsWeakPtr())));
+ gpu_channel_host, factories_loop, context3d)));
}
#endif
« no previous file with comments | « content/renderer/media/renderer_gpu_video_decoder_factories.cc ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698