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

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

Issue 10636036: Enable renderer side mixing behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove new mixer address != old mixer address test. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "content/public/renderer/render_process_observer.h" 48 #include "content/public/renderer/render_process_observer.h"
49 #include "content/public/renderer/render_view_visitor.h" 49 #include "content/public/renderer/render_view_visitor.h"
50 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" 50 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
51 #include "content/renderer/browser_plugin/old/browser_plugin_registry.h" 51 #include "content/renderer/browser_plugin/old/browser_plugin_registry.h"
52 #include "content/renderer/devtools_agent_filter.h" 52 #include "content/renderer/devtools_agent_filter.h"
53 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" 53 #include "content/renderer/dom_storage/dom_storage_dispatcher.h"
54 #include "content/renderer/dom_storage/webstoragearea_impl.h" 54 #include "content/renderer/dom_storage/webstoragearea_impl.h"
55 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 55 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
56 #include "content/renderer/gpu/compositor_thread.h" 56 #include "content/renderer/gpu/compositor_thread.h"
57 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 57 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
58 #include "content/renderer/media/audio_hardware.h"
58 #include "content/renderer/media/audio_input_message_filter.h" 59 #include "content/renderer/media/audio_input_message_filter.h"
59 #include "content/renderer/media/audio_message_filter.h" 60 #include "content/renderer/media/audio_message_filter.h"
61 #include "content/renderer/media/audio_renderer_mixer_manager.h"
60 #include "content/renderer/media/media_stream_center.h" 62 #include "content/renderer/media/media_stream_center.h"
61 #include "content/renderer/media/video_capture_impl_manager.h" 63 #include "content/renderer/media/video_capture_impl_manager.h"
62 #include "content/renderer/media/video_capture_message_filter.h" 64 #include "content/renderer/media/video_capture_message_filter.h"
63 #include "content/renderer/plugin_channel_host.h" 65 #include "content/renderer/plugin_channel_host.h"
64 #include "content/renderer/render_process_impl.h" 66 #include "content/renderer/render_process_impl.h"
65 #include "content/renderer/render_view_impl.h" 67 #include "content/renderer/render_view_impl.h"
66 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 68 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
67 #include "grit/content_resources.h" 69 #include "grit/content_resources.h"
68 #include "ipc/ipc_channel_handle.h" 70 #include "ipc/ipc_channel_handle.h"
69 #include "ipc/ipc_platform_file.h" 71 #include "ipc/ipc_platform_file.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #endif 106 #endif
105 107
106 using WebKit::WebDocument; 108 using WebKit::WebDocument;
107 using WebKit::WebFrame; 109 using WebKit::WebFrame;
108 using WebKit::WebNetworkStateNotifier; 110 using WebKit::WebNetworkStateNotifier;
109 using WebKit::WebRuntimeFeatures; 111 using WebKit::WebRuntimeFeatures;
110 using WebKit::WebScriptController; 112 using WebKit::WebScriptController;
111 using WebKit::WebSecurityPolicy; 113 using WebKit::WebSecurityPolicy;
112 using WebKit::WebString; 114 using WebKit::WebString;
113 using WebKit::WebView; 115 using WebKit::WebView;
116 using content::AudioRendererMixerManager;
114 using content::RenderProcessObserver; 117 using content::RenderProcessObserver;
115 118
116 namespace { 119 namespace {
117 120
118 const int64 kInitialIdleHandlerDelayMs = 1000; 121 const int64 kInitialIdleHandlerDelayMs = 1000;
119 const int64 kShortIdleHandlerDelayMs = 1000; 122 const int64 kShortIdleHandlerDelayMs = 1000;
120 const int64 kLongIdleHandlerDelayMs = 30*1000; 123 const int64 kLongIdleHandlerDelayMs = 30*1000;
121 const int kIdleCPUUsageThresholdInPercents = 3; 124 const int kIdleCPUUsageThresholdInPercents = 3;
122 125
123 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access 126 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 746 }
744 if (!gpu_vda_context3d_.get()) { 747 if (!gpu_vda_context3d_.get()) {
745 gpu_vda_context3d_.reset( 748 gpu_vda_context3d_.reset(
746 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 749 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
747 this, WebKit::WebGraphicsContext3D::Attributes(), 750 this, WebKit::WebGraphicsContext3D::Attributes(),
748 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"))); 751 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D")));
749 } 752 }
750 return gpu_vda_context3d_->AsWeakPtr(); 753 return gpu_vda_context3d_->AsWeakPtr();
751 } 754 }
752 755
756 content::AudioRendererMixerManager*
757 RenderThreadImpl::GetAudioRendererMixerManager() {
758 if (!audio_renderer_mixer_manager_.get()) {
759 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager(
760 audio_hardware::GetOutputSampleRate(),
761 audio_hardware::GetOutputBufferSize()));
762 }
763
764 return audio_renderer_mixer_manager_.get();
765 }
766
753 #if defined(OS_WIN) 767 #if defined(OS_WIN)
754 void RenderThreadImpl::PreCacheFont(const LOGFONT& log_font) { 768 void RenderThreadImpl::PreCacheFont(const LOGFONT& log_font) {
755 Send(new ChildProcessHostMsg_PreCacheFont(log_font)); 769 Send(new ChildProcessHostMsg_PreCacheFont(log_font));
756 } 770 }
757 771
758 void RenderThreadImpl::ReleaseCachedFonts() { 772 void RenderThreadImpl::ReleaseCachedFonts() {
759 Send(new ChildProcessHostMsg_ReleaseCachedFonts()); 773 Send(new ChildProcessHostMsg_ReleaseCachedFonts());
760 } 774 }
761 775
762 #endif // OS_WIN 776 #endif // OS_WIN
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1044
1031 scoped_refptr<base::MessageLoopProxy> 1045 scoped_refptr<base::MessageLoopProxy>
1032 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1046 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1033 DCHECK(message_loop() == MessageLoop::current()); 1047 DCHECK(message_loop() == MessageLoop::current());
1034 if (!file_thread_.get()) { 1048 if (!file_thread_.get()) {
1035 file_thread_.reset(new base::Thread("Renderer::FILE")); 1049 file_thread_.reset(new base::Thread("Renderer::FILE"));
1036 file_thread_->Start(); 1050 file_thread_->Start();
1037 } 1051 }
1038 return file_thread_->message_loop_proxy(); 1052 return file_thread_->message_loop_proxy();
1039 } 1053 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698