diff options
author | rniwa@chromium.org <rniwa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-22 04:02:31 +0000 |
---|---|---|
committer | rniwa@chromium.org <rniwa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-22 04:02:31 +0000 |
commit | 5380e2755ceab7effe8443b3bc833230465404d6 (patch) | |
tree | 67768705823ed67787a430b11f44e22ed7c656d1 | |
parent | 50dab3878b0a7e46413d22cc1f3ae5a93a883a36 (diff) | |
download | chromium_src-5380e2755ceab7effe8443b3bc833230465404d6.zip chromium_src-5380e2755ceab7effe8443b3bc833230465404d6.tar.gz chromium_src-5380e2755ceab7effe8443b3bc833230465404d6.tar.bz2 |
Revert 72259 - Bundle audio spatialization resources for use by the web audio API
This CL caused a lot of browser tests to crash on Windows.
It's possible that the crashes were caused by some bot flakiness
but we need to revert this CL first to diagnose the cause.
BUG=none
TEST=none
(I tested locally on Mac OS X against all of my web audio API demos)
Review URL: http://codereview.chromium.org/6265009
TBR=crogers@google.com
Review URL: http://codereview.chromium.org/6314015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72268 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome_browser.gypi | 4 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 68 |
2 files changed, 5 insertions, 67 deletions
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 1797387..7a1ea50 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -3798,9 +3798,7 @@ '$(SDKROOT)/System/Library/Frameworks/IOKit.framework', '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', - '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', - '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework', -'$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework', + '$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework', ], 'mac_bundle_resources': [ 'browser/gpu.sb', diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index 5c2b8b1..c93fdfd 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -24,7 +24,6 @@ #include "base/synchronization/lock.h" #include "base/time.h" #include "base/utf_string_conversions.h" -#include "grit/webkit_chromium_resources.h" #include "grit/webkit_resources.h" #include "grit/webkit_strings.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCookie.h" @@ -292,59 +291,6 @@ void WebKitClientImpl::traceEventEnd(const char* name, void* id, TRACE_EVENT_END(name, id, extra); } -namespace { - -WebData loadAudioSpatializationResource(const char* name) { -#ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 - const size_t kExpectedSpatializationNameLength = 31; - if (strlen(name) != kExpectedSpatializationNameLength) { - return WebData(); - } - - // Extract the azimuth and elevation from the resource name. - int azimuth = 0; - int elevation = 0; - int values_parsed = - sscanf(name, "IRC_Composite_C_R0195_T%3d_P%3d", &azimuth, &elevation); - if (values_parsed != 2) { - return WebData(); - } - - // The resource index values go through the elevations first, then azimuths. - const int kAngleSpacing = 15; - - // 0 <= elevation <= 90 (or 315 <= elevation <= 345) - // in increments of 15 degrees. - int elevation_index = - elevation <= 90 ? elevation / kAngleSpacing : - 7 + (elevation - 315) / kAngleSpacing; - bool is_elevation_index_good = 0 <= elevation_index && elevation_index < 10; - - // 0 <= azimuth < 360 in increments of 15 degrees. - int azimuth_index = azimuth / kAngleSpacing; - bool is_azimuth_index_good = 0 <= azimuth_index && azimuth_index < 24; - - const int kNumberOfElevations = 10; - const int kNumberOfAudioResources = 240; - int resource_index = kNumberOfElevations * azimuth_index + elevation_index; - bool is_resource_index_good = 0 <= resource_index && - resource_index < kNumberOfAudioResources; - - if (is_azimuth_index_good && is_elevation_index_good && - is_resource_index_good) { - const int kFirstAudioResourceIndex = IDR_AUDIO_SPATIALIZATION_T000_P000; - base::StringPiece resource = - GetDataResource(kFirstAudioResourceIndex + resource_index); - return WebData(resource.data(), resource.size()); - } -#endif // IDR_AUDIO_SPATIALIZATION_T000_P000 - - NOTREACHED(); - return WebData(); -} - -} // namespace - WebData WebKitClientImpl::loadResource(const char* name) { struct { const char* name; @@ -396,16 +342,10 @@ WebData WebKitClientImpl::loadResource(const char* name) { { "linuxProgressValue", IDR_PROGRESS_VALUE }, #endif }; - - // Check the name prefix to see if it's an audio resource. - if (StartsWithASCII(name, "IRC_Composite", true)) { - return loadAudioSpatializationResource(name); - } else { - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { - if (!strcmp(name, resources[i].name)) { - base::StringPiece resource = GetDataResource(resources[i].id); - return WebData(resource.data(), resource.size()); - } + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { + if (!strcmp(name, resources[i].name)) { + base::StringPiece resource = GetDataResource(resources[i].id); + return WebData(resource.data(), resource.size()); } } // TODO(jhawkins): Restore this NOTREACHED once WK stops sending in empty |