Bug 1456978 - Rename function to a more appropriate name. r?sotaro draft
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 27 Apr 2018 07:41:03 -0400
changeset 789025 b1cf6fa68507100689d3dbd16d1473c33f1811d1
parent 789020 d2d518b1f8730eb61554df7179ef9a2aeed4d843
child 789026 f47cffd517195527051d4409e103b45774fff62c
push id108135
push userkgupta@mozilla.com
push dateFri, 27 Apr 2018 11:41:59 +0000
reviewerssotaro
bugs1456978
milestone61.0a1
Bug 1456978 - Rename function to a more appropriate name. r?sotaro MozReview-Commit-ID: 2mVFcPsK6oe
gfx/webrender_bindings/RenderThread.cpp
gfx/webrender_bindings/RenderThread.h
--- a/gfx/webrender_bindings/RenderThread.cpp
+++ b/gfx/webrender_bindings/RenderThread.cpp
@@ -187,17 +187,17 @@ RenderThread::NewFrameReady(wr::WindowId
     return;
   }
 
   if (IsDestroyed(aWindowId)) {
     return;
   }
 
   UpdateAndRender(aWindowId);
-  DecPendingFrameCount(aWindowId);
+  FrameRenderingComplete(aWindowId);
 }
 
 void
 RenderThread::WakeUp(wr::WindowId aWindowId)
 {
   if (mHasShutdown) {
     return;
   }
@@ -394,17 +394,17 @@ RenderThread::IncRenderingFrameCount(wr:
     return;
   }
   // Update rendering frame count.
   info.mRenderingCount = info.mRenderingCount + 1;
   mWindowInfos.Put(AsUint64(aWindowId), info);
 }
 
 void
-RenderThread::DecPendingFrameCount(wr::WindowId aWindowId)
+RenderThread::FrameRenderingComplete(wr::WindowId aWindowId)
 {
   MutexAutoLock lock(mFrameCountMapLock);
   // Get the old count.
   WindowInfo info;
   if (!mWindowInfos.Get(AsUint64(aWindowId), &info)) {
     MOZ_ASSERT(false);
     return;
   }
--- a/gfx/webrender_bindings/RenderThread.h
+++ b/gfx/webrender_bindings/RenderThread.h
@@ -150,17 +150,17 @@ public:
   void SetDestroyed(wr::WindowId aWindowId);
   /// Can be called from any thread.
   bool TooManyPendingFrames(wr::WindowId aWindowId);
   /// Can be called from any thread.
   void IncPendingFrameCount(wr::WindowId aWindowId);
   /// Can be called from any thread.
   void IncRenderingFrameCount(wr::WindowId aWindowId);
   /// Can be called from any thread.
-  void DecPendingFrameCount(wr::WindowId aWindowId);
+  void FrameRenderingComplete(wr::WindowId aWindowId);
 
   /// Can be called from any thread.
   WebRenderThreadPool& ThreadPool() { return mThreadPool; }
 
   /// Can only be called from the render thread.
   WebRenderProgramCache* ProgramCache();
 
 private: