diff options
author | rtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 17:28:21 +0000 |
---|---|---|
committer | rtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 17:28:21 +0000 |
commit | a5db4db58b706598b0ab4ed1d3de7e5ebae91389 (patch) | |
tree | c748b0ef8e9d071b4a32bbd5016c687e8e1c0345 /webkit | |
parent | 25d457042c12439a992415595ec60c27cd9c5071 (diff) | |
download | chromium_src-a5db4db58b706598b0ab4ed1d3de7e5ebae91389.zip chromium_src-a5db4db58b706598b0ab4ed1d3de7e5ebae91389.tar.gz chromium_src-a5db4db58b706598b0ab4ed1d3de7e5ebae91389.tar.bz2 |
Support concatenated spatialization data
BUG=227141
This is initial support for concatenated spatialization data to speed up loading of the HRTF database on Android. A
followup webkit patch (https://codereview.chromium.org/14304002/) will actually enable the concatenated data.
Review URL: https://chromiumcodereview.appspot.com/14297003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webkitplatformsupport_impl.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc index c88767c..24208b7 100644 --- a/webkit/glue/webkitplatformsupport_impl.cc +++ b/webkit/glue/webkitplatformsupport_impl.cc @@ -499,6 +499,15 @@ namespace { WebData loadAudioSpatializationResource(WebKitPlatformSupportImpl* platform, const char* name) { +#ifdef IDR_AUDIO_SPATIALIZATION_COMPOSITE + if (!strcmp(name, "Composite")) { + base::StringPiece resource = + platform->GetDataResource(IDR_AUDIO_SPATIALIZATION_COMPOSITE, + ui::SCALE_FACTOR_NONE); + return WebData(resource.data(), resource.size()); + } +#endif + #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 const size_t kExpectedSpatializationNameLength = 31; if (strlen(name) != kExpectedSpatializationNameLength) { @@ -666,7 +675,8 @@ WebData WebKitPlatformSupportImpl::loadResource(const char* name) { return WebData(); // Check the name prefix to see if it's an audio resource. - if (StartsWithASCII(name, "IRC_Composite", true)) + if (StartsWithASCII(name, "IRC_Composite", true) || + StartsWithASCII(name, "Composite", true)) return loadAudioSpatializationResource(this, name); // TODO(flackr): We should use a better than linear search here, a trie would |