Bug 1275987 - Add a 'reason for warp' histogram. r=jgilbert
MozReview-Commit-ID: 7dQf7jLupqL
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -4,16 +4,17 @@
#include "GLLibraryEGL.h"
#include "gfxConfig.h"
#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/Assertions.h"
+#include "mozilla/Telemetry.h"
#include "mozilla/unused.h"
#include "nsDirectoryServiceDefs.h"
#include "nsDirectoryServiceUtils.h"
#include "nsIGfxInfo.h"
#include "nsPrintfCString.h"
#ifdef XP_WIN
#include "nsWindowsHelpers.h"
#endif
@@ -139,21 +140,23 @@ GetAndInitWARPDisplay(GLLibraryEGL& egl,
return display;
}
static bool
IsAccelAngleSupported(const nsCOMPtr<nsIGfxInfo>& gfxInfo)
{
int32_t angleSupport;
- nsCString discardFailureId;
+ nsCString failureId;
gfxUtils::ThreadSafeGetFeatureStatus(gfxInfo,
nsIGfxInfo::FEATURE_WEBGL_ANGLE,
- discardFailureId,
+ failureId,
&angleSupport);
+ Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_ACCL_FAILURE_ID,
+ failureId);
return (angleSupport == nsIGfxInfo::FEATURE_STATUS_OK);
}
static EGLDisplay
GetAndInitDisplay(GLLibraryEGL& egl, void* displayType)
{
EGLDisplay display = egl.fGetDisplay(displayType);
if (display == EGL_NO_DISPLAY)
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -1048,16 +1048,24 @@
"n_buckets": 50,
"description": "PNG image decode speed (Kbytes/sec)"
},
"CANVAS_2D_USED": {
"expires_in_version": "never",
"kind": "boolean",
"description": "2D canvas used"
},
+ "CANVAS_WEBGL_ACCL_FAILURE_ID": {
+ "alert_emails": ["bgirard@mozilla.com"],
+ "expires_in_version": "never",
+ "kind": "count",
+ "keyed": true,
+ "description": "Track the failure IDs that lead us to reject attempting to create an accelerated context. CANVAS_WEBGL_FAILURE_ID reports the overall WebGL status with the attempt to fallback.",
+ "bug_numbers": [1272808]
+ },
"CANVAS_WEBGL_FAILURE_ID": {
"alert_emails": ["bgirard@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"keyed": true,
"description": "WebGL runtime and dynamic failure IDs. This will record a count for each context creation success or failure. Each failure id is a unique identifier that can be traced back to a particular failure branch or blocklist rule.",
"bug_numbers": [1272808]
},