b=923301 remove now-unused GetCurrentGraphUpdateIndex() and rename mGraphUpdatesSent to mNextGraphUpdateIndex r=roc
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 25 Oct 2013 12:12:00 +1300
changeset 165841 42bb49c927055e9def5195b311db6341ff978755
parent 165840 1a12845a97ce8c4b2a00d61228ea7485afe648ff
child 165842 0b0a112e86d9a5c8868546c036f20cebba8ba62d
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs923301
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
b=923301 remove now-unused GetCurrentGraphUpdateIndex() and rename mGraphUpdatesSent to mNextGraphUpdateIndex r=roc
content/media/MediaStreamGraph.cpp
content/media/MediaStreamGraph.h
--- a/content/media/MediaStreamGraph.cpp
+++ b/content/media/MediaStreamGraph.cpp
@@ -1479,18 +1479,18 @@ MediaStreamGraphImpl::RunInStableState()
         mLifecycleState = LIFECYCLE_WAITING_FOR_THREAD_SHUTDOWN;
         nsCOMPtr<nsIRunnable> event = new MediaStreamGraphShutDownRunnable(this);
         NS_DispatchToMainThread(event);
       }
     } else {
       if (mLifecycleState <= LIFECYCLE_WAITING_FOR_MAIN_THREAD_CLEANUP) {
         MessageBlock* block = mMessageQueue.AppendElement();
         block->mMessages.SwapElements(mCurrentTaskMessageQueue);
-        block->mGraphUpdateIndex = mGraphUpdatesSent;
-        ++mGraphUpdatesSent;
+        block->mGraphUpdateIndex = mNextGraphUpdateIndex;
+        ++mNextGraphUpdateIndex;
         EnsureNextIterationLocked(lock);
       }
 
       if (mLifecycleState == LIFECYCLE_WAITING_FOR_MAIN_THREAD_CLEANUP) {
         mLifecycleState = LIFECYCLE_RUNNING;
         // Revive the MediaStreamGraph since we have more messages going to it.
         // Note that we need to put messages into its queue before reviving it,
         // or it might exit immediately.
--- a/content/media/MediaStreamGraph.h
+++ b/content/media/MediaStreamGraph.h
@@ -1028,23 +1028,16 @@ public:
   AudioNodeStream* CreateAudioNodeStream(AudioNodeEngine* aEngine,
                                          AudioNodeStreamKind aKind,
                                          TrackRate aSampleRate = 0);
 
   AudioNodeExternalInputStream*
   CreateAudioNodeExternalInputStream(AudioNodeEngine* aEngine,
                                      TrackRate aSampleRate = 0);
 
-  /**
-   * Returns the number of graph updates sent. This can be used to track
-   * whether a given update has been processed by the graph thread and reflected
-   * in main-thread stream state.
-   */
-  int64_t GetCurrentGraphUpdateIndex() { return mGraphUpdatesSent; }
-
   bool IsNonRealtime() const;
   /**
    * Start processing non-realtime for a specific number of ticks.
    */
   void StartNonRealtimeProcessing(uint32_t aTicksToProcess);
 
   /**
    * Media graph thread only.
@@ -1054,29 +1047,29 @@ public:
    */
   void DispatchToMainThreadAfterStreamStateUpdate(already_AddRefed<nsIRunnable> aRunnable)
   {
     *mPendingUpdateRunnables.AppendElement() = aRunnable;
   }
 
 protected:
   MediaStreamGraph()
-    : mGraphUpdatesSent(1)
+    : mNextGraphUpdateIndex(1)
   {
     MOZ_COUNT_CTOR(MediaStreamGraph);
   }
   ~MediaStreamGraph()
   {
     MOZ_COUNT_DTOR(MediaStreamGraph);
   }
 
   // Media graph thread only
   nsTArray<nsCOMPtr<nsIRunnable> > mPendingUpdateRunnables;
 
   // Main thread only
-  // The number of updates we have sent to the media graph thread. We start
-  // this at 1 just to ensure that 0 is usable as a special value.
-  int64_t mGraphUpdatesSent;
+  // The number of updates we have sent to the media graph thread + 1.
+  // We start this at 1 just to ensure that 0 is usable as a special value.
+  int64_t mNextGraphUpdateIndex;
 };
 
 }
 
 #endif /* MOZILLA_MEDIASTREAMGRAPH_H_ */