Changeset 86099 in webkit


Ignore:
Timestamp:
May 9, 2011 4:02:04 PM (13 years ago)
Author:
crogers@google.com
Message:

2011-05-09 Chris Rogers <crogers@google.com>

Reviewed by Kenneth Russell.

Add RAII-style DenormalDisabler class to disable denormals which hurt audio performance
https://bugs.webkit.org/show_bug.cgi?id=60396

No new tests since audio API is not yet implemented.

  • WebCore.gypi:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/DenormalDisabler.h: Added. (WebCore::DenormalDisabler::DenormalDisabler): (WebCore::DenormalDisabler::~DenormalDisabler): (WebCore::DenormalDisabler::getCSR): (WebCore::DenormalDisabler::setCSR):
  • webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::provideInput):
Location:
trunk/Source/WebCore
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86098 r86099  
     12011-05-09  Chris Rogers  <crogers@google.com>
     2
     3        Reviewed by Kenneth Russell.
     4
     5        Add RAII-style DenormalDisabler class to disable denormals which hurt audio performance
     6        https://bugs.webkit.org/show_bug.cgi?id=60396
     7
     8        No new tests since audio API is not yet implemented.
     9
     10        * WebCore.gypi:
     11        * WebCore.xcodeproj/project.pbxproj:
     12        * platform/audio/DenormalDisabler.h: Added.
     13        (WebCore::DenormalDisabler::DenormalDisabler):
     14        (WebCore::DenormalDisabler::~DenormalDisabler):
     15        (WebCore::DenormalDisabler::getCSR):
     16        (WebCore::DenormalDisabler::setCSR):
     17        * webaudio/AudioDestinationNode.cpp:
     18        (WebCore::AudioDestinationNode::provideInput):
     19
    1202011-05-09  Tony Chang  <tony@chromium.org>
    221
  • trunk/Source/WebCore/WebCore.gypi

    r86047 r86099  
    36483648            'platform/audio/Cone.cpp',
    36493649            'platform/audio/Cone.h',
     3650            'platform/audio/DenormalDisabler.h',
    36503651            'platform/audio/Distance.cpp',
    36513652            'platform/audio/Distance.h',
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r86047 r86099  
    57365736                FD06DFA5134A4DEF006F5D7D /* DefaultAudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD06DFA3134A4DEF006F5D7D /* DefaultAudioDestinationNode.cpp */; };
    57375737                FD06DFA6134A4DEF006F5D7D /* DefaultAudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD06DFA4134A4DEF006F5D7D /* DefaultAudioDestinationNode.h */; };
     5738                FD1660A513787C6D001FFA7B /* DenormalDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = FD1660A413787C6D001FFA7B /* DenormalDisabler.h */; };
    57385739                FD2DBF1212B048A300ED98C6 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD2DBF0E12B048A300ED98C6 /* Accelerate.framework */; };
    57395740                FD2DBF1312B048A300ED98C6 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD2DBF0F12B048A300ED98C6 /* AudioToolbox.framework */; };
     
    1223312234                FD06DFA3134A4DEF006F5D7D /* DefaultAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultAudioDestinationNode.cpp; sourceTree = "<group>"; };
    1223412235                FD06DFA4134A4DEF006F5D7D /* DefaultAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultAudioDestinationNode.h; sourceTree = "<group>"; };
     12236                FD1660A413787C6D001FFA7B /* DenormalDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DenormalDisabler.h; path = webaudio/audio/DenormalDisabler.h; sourceTree = SOURCE_ROOT; };
    1223512237                FD2DBF0E12B048A300ED98C6 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = "<absolute>"; };
    1223612238                FD2DBF0F12B048A300ED98C6 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
     
    1956319565                                FD31605A12B026F700C1A359 /* Distance.cpp */,
    1956419566                                FD31605B12B026F700C1A359 /* Distance.h */,
     19567                                FD1660A413787C6D001FFA7B /* DenormalDisabler.h */,
    1956519568                                FD31605C12B026F700C1A359 /* EqualPowerPanner.cpp */,
    1956619569                                FD31605D12B026F700C1A359 /* EqualPowerPanner.h */,
     
    2274222745                                37AFFDF71370A0B800E895C0 /* SharedBufferCRLFLineReader.h in Headers */,
    2274322746                                379E371713736A6600B9E919 /* QuotedPrintable.h in Headers */,
     22747                                FD1660A513787C6D001FFA7B /* DenormalDisabler.h in Headers */,
    2274422748                        );
    2274522749                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/webaudio/AudioDestinationNode.cpp

    r82963 r86099  
    3333#include "AudioNodeInput.h"
    3434#include "AudioNodeOutput.h"
     35#include "DenormalDisabler.h"
    3536
    3637namespace WebCore {
     
    5354void AudioDestinationNode::provideInput(AudioBus* destinationBus, size_t numberOfFrames)
    5455{
     56    // We don't want denormals slowing down any of the audio processing
     57    // since they can very seriously hurt performance.
     58    // This will take care of all AudioNodes because they all process within this scope.
     59    DenormalDisabler denormalDisabler;
     60   
    5561    context()->setAudioThread(currentThread());
    5662   
Note: See TracChangeset for help on using the changeset viewer.