summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorhayato <hayato@chromium.org>2015-03-30 19:02:04 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-31 02:03:02 +0000
commit5713bf145fcfcd041366b0be659bdc35ffcedc08 (patch)
tree27bee4f8f6127d1d03f218699ffca2876de1418e /content/renderer
parent384e5fae06aa2f420de9215e42dfd4043c8f00f2 (diff)
downloadchromium_src-5713bf145fcfcd041366b0be659bdc35ffcedc08.zip
chromium_src-5713bf145fcfcd041366b0be659bdc35ffcedc08.tar.gz
chromium_src-5713bf145fcfcd041366b0be659bdc35ffcedc08.tar.bz2
Revert of Revert of Partially revert removal of synchronous AudioHardwareConfig requests. (patchset #1 id:1 of https://codereview.chromium.org/1047093002/)
Reason for revert: Tree cycled to green before this revert patch was in. http://build.chromium.org/p/chromium.webkit/builders/Mac%20Builder%20%28dbg%29/builds/78610 Let me revert the revert. Original issue's description: > Revert of Partially revert removal of synchronous AudioHardwareConfig requests. (patchset #1 id:1 of https://codereview.chromium.org/1042953002/) > > Reason for revert: > Blink Gardening. > Tree closer. This CL looks culprit. > > blink: Tree is closed (Automatic: "compile" on http://build.chromium.org/p/chromium.webkit/builders/Mac%20Builder%20%28dbg%29/builds/78608 "Mac Builder (dbg)" > > blink 192783 : 192783 > chromium 322927 : 322932 > > http://build.chromium.org/p/chromium.webkit/builders/Mac%20Builder%20%28dbg%29/builds/78608/steps/compile/logs/stdio > > [3175/3219] CXX obj/content/shell/renderer/content_shell_lib.shell_render_view_observer.o > [3176/3219] SOLINK libcontent.dylib, POSTBUILDS > FAILED: if [ ! -e libcontent.dylib -o ! -e libcontent.dylib.TOC ] || otool -l libcontent.dylib | grep -q LC_REEXPORT_DYLIB ; then /Volumes/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -framework Cocoa -framework Foundation -framework IOKit -framework Security -framework SystemConfiguration -Wl,-search_paths_first -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -L. -install_name @rpath/libcontent.dylib -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/../../.. -o libcontent.dylib @libcontent.dylib.rsp && { otool -l libcontent.dylib | grep LC_ID_DYLIB -A 5; nm -gP libcontent.dylib | cut -f1-2 -d' ' | grep -v U$; true; } > libcontent.dylib.TOC; else /Volumes/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -framework Cocoa -framework Foundation -framework IOKit -framework Security -framework SystemConfiguration -Wl,-search_paths_first -mmacosx-version-min=10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -L. -install_name @rpath/libcontent.dylib -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/../../.. -o libcontent.dylib @libcontent.dylib.rsp && { otool -l libcontent.dylib | grep LC_ID_DYLIB -A 5; nm -gP libcontent.dylib | cut -f1-2 -d' ' | grep -v U$; true; } > libcontent.dylib.tmp && if ! cmp -s libcontent.dylib.tmp libcontent.dylib.TOC; then mv libcontent.dylib.tmp libcontent.dylib.TOC ; fi; fi > Undefined symbols for architecture x86_64: > "ViewMsg_SetAudioHardwareConfig::Read(IPC::Message const*, Tuple<media::AudioParameters, media::AudioParameters>*)", referenced from: > bool ViewMsg_SetAudioHardwareConfig::Dispatch<content::RenderThreadImpl, content::RenderThreadImpl, void, void (content::RenderThreadImpl::*)(media::AudioParameters const&, media::AudioParameters const&)>(IPC::Message const*, content::RenderThreadImpl*, content::RenderThreadImpl*, void*, void (content::RenderThreadImpl::*)(media::AudioParameters const&, media::AudioParameters const&)) in content.render_thread_impl.o > "media::AudioHardwareConfig::AudioHardwareConfig()", referenced from: > content::RenderThreadImpl::RenderThreadImpl(content::InProcessChildThreadParams const&) in content.render_thread_impl.o > content::RenderThreadImpl::RenderThreadImpl(content::InProcessChildThreadParams const&) in content.render_thread_impl.o > content::RenderThreadImpl::RenderThreadImpl(scoped_ptr<base::MessageLoop, base::DefaultDeleter<base::MessageLoop> >) in content.render_thread_impl.o > content::RenderThreadImpl::RenderThreadImpl(scoped_ptr<base::MessageLoop, base::DefaultDeleter<base::MessageLoop> >) in content.render_thread_impl.o > ld: symbol(s) not found for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see invocation) > ninja: build stopped: subcommand failed. > > Original issue's description: > > Partially revert removal of synchronous AudioHardwareConfig requests. > > > > This regressed cold page load time on OSX by 5% :(, so revert all > > changes related to the synchronous IPC removal, but keep cleanup > > ones related to dead AudioMessageFilter device change handling. > > > > Revert "Use the worker task runner instead of the main audio thread." > > commit http://crrev.com/06def69114b5ecae4f0ee0aa875181568fe7902c > > > > Revert "Remove synchronous AudioHardwareConfig request." > > commit http://crrev.com/19faf60586e58f244371697b49eb61959d9c7be9 > > > > BUG=469737 > > TEST=audio works. > > > > Committed: https://crrev.com/5a5e42e169522531244c67b7892c4e827179e6ac > > Cr-Commit-Position: refs/heads/master@{#322928} > > TBR=nasko@chromium.org,creis@chromium.org,dalecurtis@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=469737 > > Committed: https://crrev.com/dd41f62badda4ed64987669ac9b11c7ad3101734 > Cr-Commit-Position: refs/heads/master@{#322945} TBR=nasko@chromium.org,creis@chromium.org,dalecurtis@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=469737 Review URL: https://codereview.chromium.org/1040263002 Cr-Commit-Position: refs/heads/master@{#322947}
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/media/audio_message_filter.h5
-rw-r--r--content/renderer/render_thread_impl.cc21
-rw-r--r--content/renderer/render_thread_impl.h6
3 files changed, 13 insertions, 19 deletions
diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h
index c4428aa..f082a78 100644
--- a/content/renderer/media/audio_message_filter.h
+++ b/content/renderer/media/audio_message_filter.h
@@ -44,11 +44,6 @@ class CONTENT_EXPORT AudioMessageFilter : public IPC::MessageFilter {
scoped_ptr<media::AudioOutputIPC> CreateAudioOutputIPC(int render_view_id,
int render_frame_id);
- // When set, AudioMessageFilter will update the AudioHardwareConfig with new
- // configuration values as received by OnOutputDeviceChanged(). The provided
- // |config| must outlive AudioMessageFilter.
- void SetAudioHardwareConfig(media::AudioHardwareConfig* config);
-
// IO message loop associated with this message filter.
scoped_refptr<base::MessageLoopProxy> io_message_loop() const {
return io_message_loop_;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 6e3672a..6259439 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1335,7 +1335,17 @@ AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() {
}
media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() {
- return &audio_hardware_config_;
+ if (!audio_hardware_config_) {
+ media::AudioParameters input_params;
+ media::AudioParameters output_params;
+ Send(new ViewHostMsg_GetAudioHardwareConfig(
+ &input_params, &output_params));
+
+ audio_hardware_config_.reset(new media::AudioHardwareConfig(
+ input_params, output_params));
+ }
+
+ return audio_hardware_config_.get();
}
base::WaitableEvent* RenderThreadImpl::GetShutdownEvent() {
@@ -1518,8 +1528,6 @@ bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
// is there a new non-windows message I should add here?
IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView)
IPC_MESSAGE_HANDLER(ViewMsg_NetworkTypeChanged, OnNetworkTypeChanged)
- IPC_MESSAGE_HANDLER(ViewMsg_SetAudioHardwareConfig,
- OnSetAudioHardwareConfig)
IPC_MESSAGE_HANDLER(ViewMsg_TempCrashWithData, OnTempCrashWithData)
IPC_MESSAGE_HANDLER(WorkerProcessMsg_CreateWorker, OnCreateNewSharedWorker)
IPC_MESSAGE_HANDLER(ViewMsg_TimezoneChange, OnUpdateTimezone)
@@ -1682,13 +1690,6 @@ void RenderThreadImpl::OnNetworkTypeChanged(
NetConnectionTypeToWebConnectionType(type));
}
-void RenderThreadImpl::OnSetAudioHardwareConfig(
- const media::AudioParameters& input,
- const media::AudioParameters& output) {
- audio_hardware_config_.UpdateInputConfig(input);
- audio_hardware_config_.UpdateOutputConfig(output);
-}
-
void RenderThreadImpl::OnTempCrashWithData(const GURL& data) {
GetContentClient()->SetActiveURL(data);
CHECK(false);
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index c4a05a2..0a77b36 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -25,7 +25,6 @@
#include "content/common/gpu/gpu_result_codes.h"
#include "content/public/renderer/render_thread.h"
#include "content/renderer/gpu/compositor_dependencies.h"
-#include "media/base/audio_hardware_config.h"
#include "net/base/network_change_notifier.h"
#include "third_party/WebKit/public/platform/WebConnectionType.h"
#include "ui/gfx/native_widget_types.h"
@@ -67,6 +66,7 @@ class MessageFilter;
}
namespace media {
+class AudioHardwareConfig;
class GpuVideoAcceleratorFactories;
}
@@ -453,8 +453,6 @@ class CONTENT_EXPORT RenderThreadImpl
#endif
void OnNetworkTypeChanged(net::NetworkChangeNotifier::ConnectionType type);
void OnGetAccessibilityTree();
- void OnSetAudioHardwareConfig(const media::AudioParameters& input,
- const media::AudioParameters& output);
void OnTempCrashWithData(const GURL& data);
void OnUpdateTimezone();
void OnMemoryPressure(
@@ -584,7 +582,7 @@ class CONTENT_EXPORT RenderThreadImpl
scoped_refptr<ContextProviderCommandBuffer> gpu_va_context_provider_;
scoped_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_;
- media::AudioHardwareConfig audio_hardware_config_;
+ scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_;
HistogramCustomizer histogram_customizer_;