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

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

Issue 20632002: Add media::VideoEncodeAccelerator with WebRTC integration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: d3982027 CQ nits. Created 7 years, 4 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #include "content/renderer/render_process_visibility_manager.h" 80 #include "content/renderer/render_process_visibility_manager.h"
81 #include "content/renderer/render_view_impl.h" 81 #include "content/renderer/render_view_impl.h"
82 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 82 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
83 #include "content/renderer/skia_benchmarking_extension.h" 83 #include "content/renderer/skia_benchmarking_extension.h"
84 #include "grit/content_resources.h" 84 #include "grit/content_resources.h"
85 #include "ipc/ipc_channel_handle.h" 85 #include "ipc/ipc_channel_handle.h"
86 #include "ipc/ipc_forwarding_message_filter.h" 86 #include "ipc/ipc_forwarding_message_filter.h"
87 #include "ipc/ipc_platform_file.h" 87 #include "ipc/ipc_platform_file.h"
88 #include "media/base/audio_hardware_config.h" 88 #include "media/base/audio_hardware_config.h"
89 #include "media/base/media.h" 89 #include "media/base/media.h"
90 #include "media/filters/gpu_video_decoder_factories.h" 90 #include "media/filters/gpu_video_accelerator_factories.h"
91 #include "net/base/net_errors.h" 91 #include "net/base/net_errors.h"
92 #include "net/base/net_util.h" 92 #include "net/base/net_util.h"
93 #include "third_party/WebKit/public/platform/WebString.h" 93 #include "third_party/WebKit/public/platform/WebString.h"
94 #include "third_party/WebKit/public/web/WebColorName.h" 94 #include "third_party/WebKit/public/web/WebColorName.h"
95 #include "third_party/WebKit/public/web/WebDatabase.h" 95 #include "third_party/WebKit/public/web/WebDatabase.h"
96 #include "third_party/WebKit/public/web/WebDocument.h" 96 #include "third_party/WebKit/public/web/WebDocument.h"
97 #include "third_party/WebKit/public/web/WebFrame.h" 97 #include "third_party/WebKit/public/web/WebFrame.h"
98 #include "third_party/WebKit/public/web/WebImageCache.h" 98 #include "third_party/WebKit/public/web/WebImageCache.h"
99 #include "third_party/WebKit/public/web/WebKit.h" 99 #include "third_party/WebKit/public/web/WebKit.h"
100 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" 100 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 bool RenderThreadImpl::ResolveProxy(const GURL& url, std::string* proxy_list) { 880 bool RenderThreadImpl::ResolveProxy(const GURL& url, std::string* proxy_list) {
881 bool result = false; 881 bool result = false;
882 Send(new ViewHostMsg_ResolveProxy(url, &result, proxy_list)); 882 Send(new ViewHostMsg_ResolveProxy(url, &result, proxy_list));
883 return result; 883 return result;
884 } 884 }
885 885
886 void RenderThreadImpl::PostponeIdleNotification() { 886 void RenderThreadImpl::PostponeIdleNotification() {
887 idle_notifications_to_skip_ = 2; 887 idle_notifications_to_skip_ = 2;
888 } 888 }
889 889
890 scoped_refptr<RendererGpuVideoDecoderFactories> 890 scoped_refptr<RendererGpuVideoAcceleratorFactories>
891 RenderThreadImpl::GetGpuFactories( 891 RenderThreadImpl::GetGpuFactories(
892 const scoped_refptr<base::MessageLoopProxy>& factories_loop) { 892 const scoped_refptr<base::MessageLoopProxy>& factories_loop) {
893 DCHECK(IsMainThread()); 893 DCHECK(IsMainThread());
894 894
895 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 895 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
896 scoped_refptr<RendererGpuVideoDecoderFactories> gpu_factories; 896 scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories;
897 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; 897 WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
898 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) 898 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
899 context3d = GetGpuVDAContext3D(); 899 context3d = GetGpuVDAContext3D();
900 if (context3d) { 900 GpuChannelHost* gpu_channel_host = GetGpuChannel();
901 GpuChannelHost* gpu_channel_host = GetGpuChannel(); 901 if (gpu_channel_host) {
902 if (gpu_channel_host) { 902 gpu_factories = new RendererGpuVideoAcceleratorFactories(
903 gpu_factories = new RendererGpuVideoDecoderFactories( 903 gpu_channel_host, factories_loop, context3d);
904 gpu_channel_host, factories_loop, context3d);
905 }
906 } 904 }
907 return gpu_factories; 905 return gpu_factories;
908 } 906 }
909 907
910 /* static */ 908 /* static */
911 void RenderThreadImpl::OnGpuVDAContextLoss() { 909 void RenderThreadImpl::OnGpuVDAContextLoss() {
912 RenderThreadImpl* self = RenderThreadImpl::current(); 910 RenderThreadImpl* self = RenderThreadImpl::current();
913 DCHECK(self); 911 DCHECK(self);
914 if (!self->gpu_vda_context3d_) 912 if (!self->gpu_vda_context3d_)
915 return; 913 return;
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 1310
1313 } 1311 }
1314 1312
1315 void RenderThreadImpl::SampleGamepads(WebKit::WebGamepads* data) { 1313 void RenderThreadImpl::SampleGamepads(WebKit::WebGamepads* data) {
1316 if (!gamepad_shared_memory_reader_) 1314 if (!gamepad_shared_memory_reader_)
1317 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 1315 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
1318 gamepad_shared_memory_reader_->SampleGamepads(*data); 1316 gamepad_shared_memory_reader_->SampleGamepads(*data);
1319 } 1317 }
1320 1318
1321 } // namespace content 1319 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698