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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 19534002: Make RendererGpuVideoDecoderFactories live on arbitrary threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 7 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 62 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
63 #include "content/renderer/gpu/input_event_filter.h" 63 #include "content/renderer/gpu/input_event_filter.h"
64 #include "content/renderer/gpu/input_handler_manager.h" 64 #include "content/renderer/gpu/input_handler_manager.h"
65 #include "content/renderer/media/audio_input_message_filter.h" 65 #include "content/renderer/media/audio_input_message_filter.h"
66 #include "content/renderer/media/audio_message_filter.h" 66 #include "content/renderer/media/audio_message_filter.h"
67 #include "content/renderer/media/audio_renderer_mixer_manager.h" 67 #include "content/renderer/media/audio_renderer_mixer_manager.h"
68 #include "content/renderer/media/media_stream_center.h" 68 #include "content/renderer/media/media_stream_center.h"
69 #include "content/renderer/media/media_stream_dependency_factory.h" 69 #include "content/renderer/media/media_stream_dependency_factory.h"
70 #include "content/renderer/media/midi_message_filter.h" 70 #include "content/renderer/media/midi_message_filter.h"
71 #include "content/renderer/media/peer_connection_tracker.h" 71 #include "content/renderer/media/peer_connection_tracker.h"
72 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
73 #include "content/renderer/media/video_capture_impl_manager.h" 72 #include "content/renderer/media/video_capture_impl_manager.h"
74 #include "content/renderer/media/video_capture_message_filter.h" 73 #include "content/renderer/media/video_capture_message_filter.h"
75 #include "content/renderer/memory_benchmarking_extension.h" 74 #include "content/renderer/memory_benchmarking_extension.h"
76 #include "content/renderer/p2p/socket_dispatcher.h" 75 #include "content/renderer/p2p/socket_dispatcher.h"
77 #include "content/renderer/plugin_channel_host.h" 76 #include "content/renderer/plugin_channel_host.h"
78 #include "content/renderer/render_process_impl.h" 77 #include "content/renderer/render_process_impl.h"
79 #include "content/renderer/render_process_visibility_manager.h" 78 #include "content/renderer/render_process_visibility_manager.h"
80 #include "content/renderer/render_view_impl.h" 79 #include "content/renderer/render_view_impl.h"
81 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 80 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
82 #include "content/renderer/skia_benchmarking_extension.h" 81 #include "content/renderer/skia_benchmarking_extension.h"
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 bool result = false; 879 bool result = false;
881 Send(new ViewHostMsg_ResolveProxy(url, &result, proxy_list)); 880 Send(new ViewHostMsg_ResolveProxy(url, &result, proxy_list));
882 return result; 881 return result;
883 } 882 }
884 883
885 void RenderThreadImpl::PostponeIdleNotification() { 884 void RenderThreadImpl::PostponeIdleNotification() {
886 idle_notifications_to_skip_ = 2; 885 idle_notifications_to_skip_ = 2;
887 } 886 }
888 887
889 scoped_refptr<media::GpuVideoDecoder::Factories> 888 scoped_refptr<media::GpuVideoDecoder::Factories>
890 RenderThreadImpl::GetGpuFactories() { 889 RenderThreadImpl::GetGpuFactories(
890 const scoped_refptr<base::MessageLoopProxy>& factories_loop) {
891 DCHECK(IsMainThread()); 891 DCHECK(IsMainThread());
892 892
893 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 893 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
894 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; 894 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories;
895 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; 895 WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
896 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) 896 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
897 context3d = GetGpuVDAContext3D(); 897 context3d = GetGpuVDAContext3D();
898 if (context3d) { 898 if (context3d) {
899 scoped_refptr<base::MessageLoopProxy> factories_loop =
900 compositor_message_loop_proxy();
901 if (!factories_loop.get())
902 factories_loop = base::MessageLoopProxy::current();
903 GpuChannelHost* gpu_channel_host = GetGpuChannel(); 899 GpuChannelHost* gpu_channel_host = GetGpuChannel();
904 if (gpu_channel_host) { 900 if (gpu_channel_host) {
905 gpu_factories = new RendererGpuVideoDecoderFactories( 901 gpu_factories = new RendererGpuVideoDecoderFactories(
906 gpu_channel_host, factories_loop, context3d); 902 gpu_channel_host, factories_loop, context3d);
907 } 903 }
908 } 904 }
909 return gpu_factories; 905 return gpu_factories;
910 } 906 }
911 907
912 /* static */ 908 /* static */
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 1296
1301 void RenderThreadImpl::SetFlingCurveParameters( 1297 void RenderThreadImpl::SetFlingCurveParameters(
1302 const std::vector<float>& new_touchpad, 1298 const std::vector<float>& new_touchpad,
1303 const std::vector<float>& new_touchscreen) { 1299 const std::vector<float>& new_touchscreen) {
1304 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1300 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1305 new_touchscreen); 1301 new_touchscreen);
1306 1302
1307 } 1303 }
1308 1304
1309 } // namespace content 1305 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698