зеркало из https://github.com/mozilla/gecko-dev.git
bug 1205558 remove unnecessary ScriptProcessorNodeEngine::mSource r=padenot
--HG-- extra : rebase_source : 11eb2a10320e4e8028266730f3208f2b8cbc314f
This commit is contained in:
Родитель
56758d35f3
Коммит
cc26ca0fff
|
@ -245,20 +245,14 @@ public:
|
|||
uint32_t aBufferSize,
|
||||
uint32_t aNumberOfInputChannels)
|
||||
: AudioNodeEngine(aNode)
|
||||
, mSource(nullptr)
|
||||
, mDestination(aDestination->Stream())
|
||||
, mSharedBuffers(new SharedBuffers(mDestination->SampleRate()))
|
||||
, mBufferSize(aBufferSize)
|
||||
, mInputChannelCount(aNumberOfInputChannels)
|
||||
, mInputWriteIndex(0)
|
||||
{
|
||||
}
|
||||
|
||||
void SetSourceStream(AudioNodeStream* aSource)
|
||||
{
|
||||
mSource = aSource;
|
||||
mSharedBuffers = new SharedBuffers(mSource->SampleRate());
|
||||
}
|
||||
|
||||
SharedBuffers* GetSharedBuffers() const
|
||||
{
|
||||
return mSharedBuffers;
|
||||
|
@ -345,7 +339,6 @@ public:
|
|||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
|
||||
{
|
||||
// Not owned:
|
||||
// - mSource (probably)
|
||||
// - mDestination (probably)
|
||||
size_t amount = AudioNodeEngine::SizeOfExcludingThis(aMallocSizeOf);
|
||||
amount += mSharedBuffers->SizeOfIncludingThis(aMallocSizeOf);
|
||||
|
@ -477,9 +470,8 @@ private:
|
|||
|
||||
friend class ScriptProcessorNode;
|
||||
|
||||
nsAutoPtr<SharedBuffers> mSharedBuffers;
|
||||
AudioNodeStream* mSource;
|
||||
AudioNodeStream* mDestination;
|
||||
nsAutoPtr<SharedBuffers> mSharedBuffers;
|
||||
nsRefPtr<ThreadSharedFloatArrayBufferList> mInputBuffer;
|
||||
const uint32_t mBufferSize;
|
||||
const uint32_t mInputChannelCount;
|
||||
|
@ -509,7 +501,6 @@ ScriptProcessorNode::ScriptProcessorNode(AudioContext* aContext,
|
|||
aNumberOfInputChannels);
|
||||
mStream = AudioNodeStream::Create(aContext, engine,
|
||||
AudioNodeStream::NO_STREAM_FLAGS);
|
||||
engine->SetSourceStream(mStream);
|
||||
}
|
||||
|
||||
ScriptProcessorNode::~ScriptProcessorNode()
|
||||
|
|
Загрузка…
Ссылка в новой задаче