bug 1391482 remove now-unused ThreadSharedFloatArrayBufferList SetBuffer() variant r?padenot draft
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 10 Aug 2017 17:49:38 +1200
changeset 648603 faf13d54356fd82d70601f57f9888fb65edf2885
parent 648602 0fa957cf17c4674e4b33b79cf186f87e59c04cff
child 648604 7598e714dea76c4857073f836185a7bb1372ecfa
push id74809
push userktomlinson@mozilla.com
push dateFri, 18 Aug 2017 01:10:01 +0000
reviewerspadenot
bugs1391482
milestone57.0a1
bug 1391482 remove now-unused ThreadSharedFloatArrayBufferList SetBuffer() variant r?padenot MozReview-Commit-ID: 184qw9JUONH
dom/media/webaudio/AudioNodeEngine.h
dom/media/webaudio/AudioNodeStream.cpp
dom/media/webaudio/AudioNodeStream.h
--- a/dom/media/webaudio/AudioNodeEngine.h
+++ b/dom/media/webaudio/AudioNodeEngine.h
@@ -289,20 +289,16 @@ public:
   {
     NS_ERROR("Invalid RecvTimelineEvent index");
   }
   virtual void SetThreeDPointParameter(uint32_t aIndex,
                                        const dom::ThreeDPoint& aValue)
   {
     NS_ERROR("Invalid SetThreeDPointParameter index");
   }
-  virtual void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer)
-  {
-    NS_ERROR("SetBuffer called on engine that doesn't support it");
-  }
   virtual void SetBuffer(AudioChunk&& aBuffer)
   {
     NS_ERROR("SetBuffer called on engine that doesn't support it");
   }
   // This consumes the contents of aData.  aData will be emptied after this returns.
   virtual void SetRawArrayData(nsTArray<float>& aData)
   {
     NS_ERROR("SetRawArrayData called on an engine that doesn't support it");
--- a/dom/media/webaudio/AudioNodeStream.cpp
+++ b/dom/media/webaudio/AudioNodeStream.cpp
@@ -249,37 +249,16 @@ AudioNodeStream::SetThreeDPointParameter
     ThreeDPoint mValue;
     uint32_t mIndex;
   };
 
   GraphImpl()->AppendMessage(MakeUnique<Message>(this, aIndex, aValue));
 }
 
 void
-AudioNodeStream::SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList>&& aBuffer)
-{
-  class Message final : public ControlMessage
-  {
-  public:
-    Message(AudioNodeStream* aStream,
-            already_AddRefed<ThreadSharedFloatArrayBufferList>& aBuffer)
-      : ControlMessage(aStream), mBuffer(aBuffer)
-    {}
-    void Run() override
-    {
-      static_cast<AudioNodeStream*>(mStream)->Engine()->
-          SetBuffer(mBuffer.forget());
-    }
-    RefPtr<ThreadSharedFloatArrayBufferList> mBuffer;
-  };
-
-  GraphImpl()->AppendMessage(MakeUnique<Message>(this, aBuffer));
-}
-
-void
 AudioNodeStream::SetBuffer(AudioChunk&& aBuffer)
 {
   class Message final : public ControlMessage
   {
   public:
     Message(AudioNodeStream* aStream, AudioChunk&& aBuffer)
       : ControlMessage(aStream), mBuffer(aBuffer)
     {}
--- a/dom/media/webaudio/AudioNodeStream.h
+++ b/dom/media/webaudio/AudioNodeStream.h
@@ -86,17 +86,16 @@ public:
    * Sets a parameter that's a time relative to some stream's played time.
    * This time is converted to a time relative to this stream when it's set.
    */
   void SetStreamTimeParameter(uint32_t aIndex, AudioContext* aContext,
                               double aStreamTime);
   void SetDoubleParameter(uint32_t aIndex, double aValue);
   void SetInt32Parameter(uint32_t aIndex, int32_t aValue);
   void SetThreeDPointParameter(uint32_t aIndex, const dom::ThreeDPoint& aValue);
-  void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList>&& aBuffer);
   void SetBuffer(AudioChunk&& aBuffer);
   // This sends a single event to the timeline on the MSG thread side.
   void SendTimelineEvent(uint32_t aIndex, const dom::AudioTimelineEvent& aEvent);
   // This consumes the contents of aData.  aData will be emptied after this returns.
   void SetRawArrayData(nsTArray<float>& aData);
   void SetChannelMixingParameters(uint32_t aNumberOfChannels,
                                   ChannelCountMode aChannelCountMoe,
                                   ChannelInterpretation aChannelInterpretation);