Bug 1289873 - correction made for compositing failure ids in failure path not showing up
MozReview-Commit-ID: CRIJwplDBYS
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1597,30 +1597,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,