Bug 905409 - Minimize the Web Audio #includes; r=roc

This commit is contained in:
Ehsan Akhgari 2013-08-14 18:46:00 -04:00
parent 620bd9e45a
commit 22b906442c
44 changed files with 50 additions and 73 deletions

View File

@ -7,14 +7,12 @@
#include "AudioBuffer.h"
#include "mozilla/dom/AudioBufferBinding.h"
#include "nsContentUtils.h"
#include "AudioContext.h"
#include "jsfriendapi.h"
#include "mozilla/ErrorResult.h"
#include "AudioSegment.h"
#include "nsIScriptError.h"
#include "nsPIDOMWindow.h"
#include "AudioChannelFormat.h"
#include "mozilla/PodOperations.h"
#include "AudioNodeEngine.h"
namespace mozilla {
namespace dom {

View File

@ -14,8 +14,6 @@
#include "nsAutoPtr.h"
#include "nsTArray.h"
#include "AudioContext.h"
#include "AudioSegment.h"
#include "AudioNodeEngine.h"
struct JSContext;
class JSObject;
@ -23,9 +21,12 @@ class JSObject;
namespace mozilla {
class ErrorResult;
class ThreadSharedFloatArrayBufferList;
namespace dom {
class AudioContext;
/**
* An AudioBuffer keeps its data either in the mJSChannels objects, which
* are Float32Arrays, or in mSharedChannels if the mJSChannels objects have

View File

@ -10,7 +10,7 @@
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"
#include "AudioDestinationNode.h"
#include "PannerNode.h"
#include "AudioParamTimeline.h"
#include "speex/speex_resampler.h"
#include <limits>

View File

@ -9,12 +9,12 @@
#include "AudioNode.h"
#include "AudioBuffer.h"
#include "AudioParam.h"
#include "mozilla/dom/BindingUtils.h"
namespace mozilla {
namespace dom {
class AudioParam;
class AudioBufferSourceNode : public AudioNode,
public MainThreadMediaStreamListener
{

View File

@ -9,9 +9,7 @@
#include "EnableWebAudioCheck.h"
#include "MediaBufferDecoder.h"
#include "MediaStreamGraph.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/AudioContextBinding.h"
#include "mozilla/dom/TypedArray.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
@ -19,7 +17,6 @@
#include "nsDOMEventTargetHelper.h"
#include "nsHashKeys.h"
#include "nsTHashtable.h"
#include "StreamBuffer.h"
// X11 has a #define for CurrentTime. Unbelievable :-(.
// See content/media/DOMMediaStream.h for more fun!
@ -33,8 +30,10 @@ class nsPIDOMWindow;
namespace mozilla {
class DOMMediaStream;
class ErrorResult;
struct WebAudioDecodeJob;
class MediaStream;
class MediaStreamGraph;
namespace dom {
@ -55,7 +54,6 @@ class HTMLMediaElement;
class MediaElementAudioSourceNode;
class MediaStreamAudioDestinationNode;
class MediaStreamAudioSourceNode;
class OfflineRenderSuccessCallback;
class PannerNode;
class ScriptProcessorNode;
class WaveShaperNode;

View File

@ -6,7 +6,6 @@
#include "AudioListener.h"
#include "AudioContext.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/AudioListenerBinding.h"
namespace mozilla {

View File

@ -23,8 +23,6 @@ namespace mozilla {
namespace dom {
class AudioContext;
class AudioListener MOZ_FINAL : public nsWrapperCache,
public EnableWebAudioCheck
{

View File

@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AudioNode.h"
#include "AudioContext.h"
#include "mozilla/ErrorResult.h"
#include "AudioNodeStream.h"

View File

@ -10,24 +10,21 @@
#include "nsDOMEventTargetHelper.h"
#include "mozilla/dom/AudioNodeBinding.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/Attributes.h"
#include "EnableWebAudioCheck.h"
#include "nsAutoPtr.h"
#include "nsTArray.h"
#include "AudioContext.h"
#include "AudioParamTimeline.h"
#include "MediaStreamGraph.h"
#include "WebAudioUtils.h"
struct JSContext;
namespace mozilla {
class ErrorResult;
namespace dom {
class AudioContext;
class AudioBufferSourceNode;
class AudioParam;
class AudioParamTimeline;
struct ThreeDPoint;
template<class T>

View File

@ -5,11 +5,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AudioParam.h"
#include "nsIDOMWindow.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/AudioParamBinding.h"
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"
#include "AudioContext.h"
namespace mozilla {
namespace dom {

View File

@ -10,16 +10,13 @@
#include "AudioParamTimeline.h"
#include "nsWrapperCache.h"
#include "nsCycleCollectionParticipant.h"
#include "nsCOMPtr.h"
#include "EnableWebAudioCheck.h"
#include "nsAutoPtr.h"
#include "AudioNode.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/Util.h"
#include "WebAudioUtils.h"
struct JSContext;
class nsIDOMWindow;
namespace mozilla {

View File

@ -6,6 +6,7 @@
#include "AudioProcessingEvent.h"
#include "mozilla/dom/AudioProcessingEventBinding.h"
#include "AudioContext.h"
namespace mozilla {
namespace dom {

View File

@ -11,6 +11,7 @@
#include "WebAudioUtils.h"
#include "blink/Biquad.h"
#include "mozilla/Preferences.h"
#include "AudioParamTimeline.h"
namespace mozilla {
namespace dom {

View File

@ -8,7 +8,6 @@
#include "mozilla/dom/ChannelMergerNodeBinding.h"
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"
#include "mozilla/PodOperations.h"
namespace mozilla {
namespace dom {

View File

@ -8,7 +8,6 @@
#include "mozilla/dom/ChannelSplitterNodeBinding.h"
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"
#include "mozilla/PodOperations.h"
namespace mozilla {
namespace dom {

View File

@ -9,9 +9,7 @@
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"
#include "blink/Reverb.h"
#include <cmath>
#include "nsMathUtils.h"
#include "PlayingRefChangeHandler.h"
namespace mozilla {
namespace dom {

View File

@ -9,11 +9,12 @@
#include "AudioNode.h"
#include "AudioBuffer.h"
#include "PlayingRefChangeHandler.h"
namespace mozilla {
namespace dom {
template <class T> class PlayingRefChangeHandler;
class ConvolverNode : public AudioNode
{
public:

View File

@ -11,6 +11,7 @@
#include "AudioDestinationNode.h"
#include "WebAudioUtils.h"
#include "DelayProcessor.h"
#include "PlayingRefChangeHandler.h"
namespace mozilla {
namespace dom {

View File

@ -9,12 +9,12 @@
#include "AudioNode.h"
#include "AudioParam.h"
#include "PlayingRefChangeHandler.h"
namespace mozilla {
namespace dom {
class AudioContext;
template <class T> class PlayingRefChangeHandler;
class DelayNode : public AudioNode
{

View File

@ -30,8 +30,6 @@
#include "FFTBlock.h"
#include "AudioNodeEngine.h"
#include <complex>
namespace mozilla {

View File

@ -8,6 +8,7 @@
#include "AbstractMediaDecoder.h"
#include "mozilla/Attributes.h"
#include "mozilla/ReentrantMonitor.h"
#include "mozilla/dom/AudioContextBinding.h"
#include <speex/speex_resampler.h>
#include "nsXPCOMCIDInternal.h"
#include "nsComponentManagerUtils.h"
@ -16,8 +17,6 @@
#include "DecoderTraits.h"
#include "AudioContext.h"
#include "AudioBuffer.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptContext.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIScriptError.h"
#include "nsMimeTypes.h"

View File

@ -14,11 +14,9 @@
#include "nsString.h"
#include "nsTArray.h"
#include "mozilla/dom/TypedArray.h"
#include <utility>
namespace mozilla {
class MediaDecoderReader;
namespace dom {
class AudioBuffer;
class AudioContext;

View File

@ -6,7 +6,6 @@
#include "MediaElementAudioSourceNode.h"
#include "mozilla/dom/MediaElementAudioSourceNodeBinding.h"
#include "mozilla/dom/HTMLMediaElement.h"
namespace mozilla {
namespace dom {

View File

@ -12,8 +12,6 @@
namespace mozilla {
namespace dom {
class HTMLMediaElement;
class MediaElementAudioSourceNode : public MediaStreamAudioSourceNode
{
public:

View File

@ -6,7 +6,6 @@
#include "MediaStreamAudioDestinationNode.h"
#include "nsIDocument.h"
#include "mozilla/dom/AudioStreamTrack.h"
#include "mozilla/dom/MediaStreamAudioDestinationNodeBinding.h"
#include "AudioNodeEngine.h"
#include "AudioNodeStream.h"

View File

@ -10,8 +10,6 @@
#include "AudioNode.h"
namespace mozilla {
class DOMMediaStream;
namespace dom {
class MediaStreamAudioDestinationNode : public AudioNode

View File

@ -6,6 +6,7 @@
#include "OfflineAudioCompletionEvent.h"
#include "mozilla/dom/OfflineAudioCompletionEventBinding.h"
#include "AudioContext.h"
namespace mozilla {
namespace dom {

View File

@ -9,11 +9,12 @@
#include "nsDOMEvent.h"
#include "AudioBuffer.h"
#include "AudioContext.h"
namespace mozilla {
namespace dom {
class AudioContext;
class OfflineAudioCompletionEvent : public nsDOMEvent,
public EnableWebAudioCheck
{

View File

@ -10,6 +10,7 @@
#include "AudioListener.h"
#include "AudioBufferSourceNode.h"
#include "blink/HRTFPanner.h"
#include "blink/HRTFDatabaseLoader.h"
using WebCore::HRTFDatabaseLoader;
using WebCore::HRTFPanner;

View File

@ -8,9 +8,6 @@
#define PannerNode_h_
#include "AudioNode.h"
#include "AudioParam.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/TypedEnum.h"
#include "mozilla/dom/PannerNodeBinding.h"
#include "ThreeDPoint.h"
#include "mozilla/WeakPtr.h"

View File

@ -11,13 +11,9 @@
#include "nsAutoPtr.h"
namespace mozilla {
class AudioNodeStream;
namespace dom {
class AudioContext;
class ScriptProcessorNodeEngine;
class SharedBuffers;
class ScriptProcessorNode : public AudioNode

View File

@ -8,8 +8,8 @@
#define WaveShaperNode_h_
#include "AudioNode.h"
#include "AudioParam.h"
#include "mozilla/dom/WaveShaperNodeBinding.h"
#include "mozilla/dom/TypedArray.h"
namespace mozilla {
namespace dom {

View File

@ -6,6 +6,7 @@
#include "WebAudioUtils.h"
#include "AudioNodeStream.h"
#include "AudioParamTimeline.h"
#include "blink/HRTFDatabaseLoader.h"
namespace mozilla {

View File

@ -10,16 +10,18 @@
#include <cmath>
#include <limits>
#include "mozilla/TypeTraits.h"
#include "mozilla/Assertions.h"
#include "AudioParamTimeline.h"
#include "mozilla/FloatingPoint.h"
#include "MediaSegment.h"
namespace mozilla {
class AudioNodeStream;
class MediaStream;
namespace dom {
class AudioParamTimeline;
struct WebAudioUtils {
// This is an arbitrary large number used to protect against OOMs.
// We can adjust it later if needed.

View File

@ -30,7 +30,6 @@
#include "Biquad.h"
#include <algorithm>
#include <stdio.h>
namespace WebCore {

View File

@ -27,7 +27,6 @@
*/
#include "HRTFDatabaseLoader.h"
#include "HRTFDatabase.h"
using namespace mozilla;

View File

@ -29,11 +29,13 @@
#ifndef HRTFDatabaseLoader_h
#define HRTFDatabaseLoader_h
#include "HRTFDatabase.h"
#include "nsTHashtable.h"
#include "nsHashKeys.h"
#include "mozilla/RefPtr.h"
#include "nsIThread.h"
#include "mozilla/Mutex.h"
#include "HRTFDatabase.h"
template <class EntryType> class nsTHashtable;
template <class T> class nsAutoRef;
namespace WebCore {

View File

@ -23,6 +23,7 @@
*/
#include "HRTFPanner.h"
#include "HRTFDatabaseLoader.h"
#include "FFTConvolver.h"
#include "HRTFDatabase.h"

View File

@ -26,7 +26,6 @@
#define HRTFPanner_h
#include "FFTConvolver.h"
#include "HRTFDatabaseLoader.h"
#include "DelayProcessor.h"
namespace mozilla {
@ -35,6 +34,8 @@ struct AudioChunk;
namespace WebCore {
class HRTFDatabaseLoader;
using mozilla::AudioChunk;
class HRTFPanner {

View File

@ -27,6 +27,7 @@
*/
#include "Reverb.h"
#include "ReverbConvolverStage.h"
#include <math.h>
#include "ReverbConvolver.h"

View File

@ -32,6 +32,7 @@
#include "ReverbConvolver.h"
#include "nsAutoPtr.h"
#include "nsTArray.h"
#include "AudioSegment.h"
namespace mozilla {
class ThreadSharedFloatArrayBufferList;
@ -39,6 +40,9 @@ class ThreadSharedFloatArrayBufferList;
namespace WebCore {
class DirectConvolver;
class FFTConvolver;
// Multi-channel convolution reverb with channel matrixing - one or more ReverbConvolver objects are used internally.
class Reverb {

View File

@ -27,6 +27,7 @@
*/
#include "ReverbConvolver.h"
#include "ReverbConvolverStage.h"
using namespace mozilla;

View File

@ -29,14 +29,8 @@
#ifndef ReverbConvolver_h
#define ReverbConvolver_h
#include "DirectConvolver.h"
#include "FFTConvolver.h"
#include "ReverbAccumulationBuffer.h"
#include "ReverbConvolverStage.h"
#include "ReverbInputBuffer.h"
#include "nsAutoPtr.h"
#include "nsTArray.h"
#include "nsCOMPtr.h"
#ifdef LOG
#undef LOG
#endif
@ -46,7 +40,7 @@
namespace WebCore {
class AudioChannel;
class ReverbConvolverStage;
class ReverbConvolver {
public:

View File

@ -29,6 +29,9 @@
#ifndef ReverbConvolverStage_h
#define ReverbConvolverStage_h
#include "DirectConvolver.h"
#include "FFTConvolver.h"
#include "nsTArray.h"
#include "mozilla/FFTBlock.h"
@ -38,8 +41,6 @@ using mozilla::FFTBlock;
class ReverbAccumulationBuffer;
class ReverbConvolver;
class FFTConvolver;
class DirectConvolver;
// A ReverbConvolverStage represents the convolution associated with a sub-section of a large impulse response.
// It incorporates a delay line to account for the offset of the sub-section within the larger impulse response.