Bug 1289873 - correction made for compositing failure ids in failure path not showing up r=BenWa
authoreyim <eyim@mozilla.com>
Fri, 29 Jul 2016 11:41:33 -0400
changeset 307268 cf46248f894fb1e6785f8e8e8d9c3d67bd6612c8
parent 307267 891c4b4e27971caacede5e669a668bd5e9f1a3e4
child 307269 fa550705a937975a81c816d0d846a8ebfcaa0bcb
push id30941
push userb56girard@gmail.com
push dateSat, 30 Jul 2016 05:08:44 +0000
treeherderautoland@cf46248f894f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa
bugs1289873
milestone50.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 1289873 - correction made for compositing failure ids in failure path not showing up r=BenWa MozReview-Commit-ID: CRIJwplDBYS
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1599,30 +1599,46 @@ CompositorBridgeParent::NewCompositor(co
       compositor = new CompositorD3D9(this, mWidget);
 #endif
     }
     nsCString failureReason;
     if (compositor && compositor->Initialize(&failureReason)) {
       if (failureReason.IsEmpty()){
         failureReason = "SUCCESS";
       }
-      if (compositor->GetBackendType() == LayersBackend::LAYERS_OPENGL){
+
+      // should only report success here
+      if (aBackendHints[i] == LayersBackend::LAYERS_OPENGL){
         Telemetry::Accumulate(Telemetry::OPENGL_COMPOSITING_FAILURE_ID, failureReason);
       }
 #ifdef XP_WIN
-      else if (compositor->GetBackendType() == LayersBackend::LAYERS_D3D9){
+      else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9){
         Telemetry::Accumulate(Telemetry::D3D9_COMPOSITING_FAILURE_ID, failureReason);
       }
-      else if (compositor->GetBackendType() == LayersBackend::LAYERS_D3D11){
+      else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11){
         Telemetry::Accumulate(Telemetry::D3D11_COMPOSITING_FAILURE_ID, failureReason);
       }
 #endif
+
       compositor->SetCompositorID(mCompositorID);
       return compositor;
     }
+
+    // report any failure reasons here
+    if (aBackendHints[i] == LayersBackend::LAYERS_OPENGL){
+      Telemetry::Accumulate(Telemetry::OPENGL_COMPOSITING_FAILURE_ID, failureReason);
+    }
+#ifdef XP_WIN
+    else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9){
+      Telemetry::Accumulate(Telemetry::D3D9_COMPOSITING_FAILURE_ID, failureReason);
+    }
+    else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11){
+      Telemetry::Accumulate(Telemetry::D3D11_COMPOSITING_FAILURE_ID, failureReason);
+    }
+#endif
   }
 
   return nullptr;
 }
 
 PLayerTransactionParent*
 CompositorBridgeParent::AllocPLayerTransactionParent(const nsTArray<LayersBackend>& aBackendHints,
                                                      const uint64_t& aId,