Bug 1500821 - Call RecordFrame() only for non-empty frame at NotifyDidRender() r=mattwoodrow
authorsotaro <sotaro.ikeda.g@gmail.com>
Tue, 23 Oct 2018 13:21:02 +0900
changeset 442405 bd15c0cbc18ab4fc6dcac68c8be86a88e1ee7e76
parent 442404 a0fac96b947ef3dbcd50106e66d14b8ff4b5a7fa
child 442406 47a7b32e57373e38139dd540394fd527442e59a2
push id109170
push usersikeda@mozilla.com
push dateTue, 23 Oct 2018 04:21:19 +0000
treeherdermozilla-inbound@bd15c0cbc18a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1500821
milestone65.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
Bug 1500821 - Call RecordFrame() only for non-empty frame at NotifyDidRender() r=mattwoodrow
gfx/webrender_bindings/RenderThread.cpp
--- a/gfx/webrender_bindings/RenderThread.cpp
+++ b/gfx/webrender_bindings/RenderThread.cpp
@@ -330,19 +330,23 @@ RenderThread::RunEvent(wr::WindowId aWin
   aEvent->Run(*this, aWindowId);
   aEvent = nullptr;
 }
 
 static void
 NotifyDidRender(layers::CompositorBridgeParent* aBridge,
                 wr::WrPipelineInfo aInfo,
                 TimeStamp aStart,
-                TimeStamp aEnd)
+                TimeStamp aEnd,
+                bool aRender)
 {
-  if (aBridge->GetWrBridge()) {
+  if (aRender && aBridge->GetWrBridge()) {
+    // We call this here to mimic the behavior in LayerManagerComposite, as to
+    // not change what Talos measures. That is, we do not record an empty frame
+    // as a frame.
     aBridge->GetWrBridge()->RecordFrame();
   }
 
   for (uintptr_t i = 0; i < aInfo.epochs.length; i++) {
     aBridge->NotifyPipelineRendered(
         aInfo.epochs.data[i].pipeline_id,
         aInfo.epochs.data[i].epoch,
         aStart,
@@ -392,17 +396,18 @@ RenderThread::UpdateAndRender(wr::Window
   MOZ_ASSERT(pipelineMgr);
   pipelineMgr->NotifyPipelinesUpdated(info);
 
   layers::CompositorThreadHolder::Loop()->PostTask(NewRunnableFunction(
     "NotifyDidRenderRunnable",
     &NotifyDidRender,
     renderer->GetCompositorBridge(),
     info,
-    aStartTime, end
+    aStartTime, end,
+    aRender
   ));
 }
 
 void
 RenderThread::Pause(wr::WindowId aWindowId)
 {
   MOZ_ASSERT(IsInRenderThread());